mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 22:41:52 +02:00
Disable crossterm raw mode
Without this change, the output of panic messages by miette would ignore newlines and become unreadable.
This commit is contained in:
@ -17,6 +17,11 @@ mod tests;
|
||||
|
||||
fn main() -> Result<()> {
|
||||
miette::set_panic_hook();
|
||||
let miette_hook = std::panic::take_hook();
|
||||
std::panic::set_hook(Box::new(move |x| {
|
||||
crossterm::terminal::disable_raw_mode().unwrap();
|
||||
miette_hook(x);
|
||||
}));
|
||||
|
||||
let engine_state = create_default_context();
|
||||
|
||||
|
Reference in New Issue
Block a user