Skip to content

Commit df024a0

Browse files
committed
Fix CC_FORCE_DISABLE=0 evaluating to true
1 parent d2dc6a9 commit df024a0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -4157,10 +4157,9 @@ fn is_disabled() -> bool {
41574157
match std::env::var_os("CC_FORCE_DISABLE") {
41584158
// Not set? Not disabled.
41594159
None => false,
4160-
// Respect `CC_FORCE_DISABLE=0` and some simple synonyms.
4161-
Some(v) if &*v != "0" && &*v != "false" && &*v != "no" => false,
4162-
// Otherwise, we're disabled. This intentionally includes `CC_FORCE_DISABLE=""`
4163-
Some(_) => true,
4160+
// Respect `CC_FORCE_DISABLE=0` and some simple synonyms, otherwise
4161+
// we're disabled. This intentionally includes `CC_FORCE_DISABLE=""`
4162+
Some(v) => &*v != "0" && &*v != "false" && &*v != "no",
41644163
}
41654164
}
41664165
match val {

0 commit comments

Comments
 (0)