mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Disable RUST_LIB_BACKTRACE if unset
When building on nightly, this is required to disable the costly anyhow backtraces.
This commit is contained in:
@@ -42,6 +42,9 @@ struct Cli {
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
env::set_var("RUST_BACKTRACE", "1");
|
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 directives = env::var("RUST_LOG").unwrap_or_else(|_| "niri=debug,info".to_owned());
|
||||||
let env_filter = EnvFilter::builder().parse_lossy(directives);
|
let env_filter = EnvFilter::builder().parse_lossy(directives);
|
||||||
|
|||||||
Reference in New Issue
Block a user