mirror of
https://github.com/nushell/nushell.git
synced 2024-12-25 00:19:39 +01:00
Enable backtraces by default (#5562)
This commit is contained in:
parent
e192684612
commit
8004e8e2a0
@ -37,6 +37,11 @@ use std::{
|
||||
thread_local! { static IS_PERF: RefCell<bool> = RefCell::new(false) }
|
||||
|
||||
fn main() -> Result<()> {
|
||||
// Enable backtraces on panic to help diagnostics
|
||||
if std::env::var("RUST_BACKTRACE").is_err() {
|
||||
std::env::set_var("RUST_BACKTRACE", "1");
|
||||
}
|
||||
|
||||
// miette::set_panic_hook();
|
||||
let miette_hook = std::panic::take_hook();
|
||||
std::panic::set_hook(Box::new(move |x| {
|
||||
|
Loading…
Reference in New Issue
Block a user