diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-30 09:57:09 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-30 09:57:09 +0400 |
| commit | f7c390a320ef2e13777c26cea687226035c94f51 (patch) | |
| tree | 295f6a7f72339701d4c4a7cce7bf9177926d77d9 | |
| parent | 3f8788e4ed9c9ee3afa8fffde04a696f627d0f72 (diff) | |
| download | niri-f7c390a320ef2e13777c26cea687226035c94f51.tar.gz niri-f7c390a320ef2e13777c26cea687226035c94f51.tar.bz2 niri-f7c390a320ef2e13777c26cea687226035c94f51.zip | |
Disable RUST_LIB_BACKTRACE if unset
When building on nightly, this is required to disable the costly
anyhow backtraces.
| -rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
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); |
