Skip to content

Commit

Permalink
Merge pull request #370 from blyxxyz/ignore-empty-no-color
Browse files Browse the repository at this point in the history
Ignore `NO_COLOR` if set to empty string
  • Loading branch information
ducaale committed Jun 4, 2024
2 parents 61c0154 + 759a339 commit 0d873a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ impl Buffer {
// Based on termcolor's logic for ColorChoice::Auto
if cfg!(test) {
Pretty::All
} else if var_os("NO_COLOR").is_some() {
} else if var_os("NO_COLOR").is_some_and(|val| !val.is_empty()) {
Pretty::Format
} else {
match var_os("TERM") {
Expand Down

0 comments on commit 0d873a0

Please sign in to comment.