Skip to content

Commit

Permalink
Use var_os instead of var
Browse files Browse the repository at this point in the history
  • Loading branch information
MiSawa committed Jun 30, 2024
1 parent a475627 commit ca8ccda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ fn run_with_input(cli: Cli, input: impl Input) -> Result<()> {
match output_format {
SerializationFormat::Json => {
let is_stdout_terminal = stdout().is_terminal();
let no_color_from_env = || std::env::var("NO_COLOR").is_ok_and(|s| !s.is_empty());
let no_color_from_env = || std::env::var_os("NO_COLOR").is_some_and(|s| !s.is_empty());
let should_colorize_output = cli.output_format.color_output
|| (is_stdout_terminal
&& !cli.output_format.monochrome_output
Expand Down

0 comments on commit ca8ccda

Please # to comment.