Skip to content

Commit

Permalink
Disable CC_ENABLE_DEBUG_OUTPUT if it is set to "0"
Browse files Browse the repository at this point in the history
It isn't always possible to completely unset an environment variable,
but it is pretty common that a value of "0" should be treated as
disabled. Use that here for `CC_ENABLE_DEBUG_OUTPUT`.
  • Loading branch information
tgross35 committed Oct 6, 2024
1 parent 7e9730b commit f6f323c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/command_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ impl CargoOutput {
metadata: true,
warnings: true,
output: OutputKind::Forward,
debug: std::env::var_os("CC_ENABLE_DEBUG_OUTPUT").is_some(),
debug: match std::env::var_os("CC_ENABLE_DEBUG_OUTPUT") {
Some(v) => v != "0",
None => false,
},
checked_dbg_var: Arc::new(AtomicBool::new(false)),
}
}
Expand Down

0 comments on commit f6f323c

Please sign in to comment.