Skip to content
Myr

Rewrite boolean condition

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Peter · committed by David Peter · parent 049d113 · Browse files · 1 file+6 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−6 removed

  • other:+6 added−6 removed

1 file+6 added−6 removed

modified:src/options.rs+6 added-6 removed
296 unmodified lines
297 if options.command_output_policy == CommandOutputPolicy::Inherit298 || !atty::is(Stream::Stdout)299 {300 OutputStyleOption::Basic301 } else if !(env::var_os("TERM")302 .map(|t| t != "unknown" && t != "dumb")303 .unwrap_or(false)304 && env::var_os("NO_COLOR")305 .map(|t| t.is_empty())306 .unwrap_or(true))301 } else if env::var_os("TERM")302 .map(|t| t == "unknown" || t == "dumb")303 .unwrap_or(true)304 || env::var_os("NO_COLOR")305 .map(|t| !t.is_empty())306 .unwrap_or(false)307 {308 OutputStyleOption::NoColor309 } else {310 OutputStyleOption::Full
97 unmodified lines