From f7c390a320ef2e13777c26cea687226035c94f51 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Sat, 30 Sep 2023 09:57:09 +0400 Subject: Disable RUST_LIB_BACKTRACE if unset When building on nightly, this is required to disable the costly anyhow backtraces. --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 62a059b1..7db9e4d5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -42,6 +42,9 @@ struct Cli { fn main() { env::set_var("RUST_BACKTRACE", "1"); + if env::var_os("RUST_LIB_BACKTRACE").is_none() { + env::set_var("RUST_LIB_BACKTRACE", "0"); + } let directives = env::var("RUST_LOG").unwrap_or_else(|_| "niri=debug,info".to_owned()); let env_filter = EnvFilter::builder().parse_lossy(directives); -- cgit