Skip to content

Commit

Permalink
[fix] Example Code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole Mussmann committed Dec 29, 2024
1 parent f4606e6 commit d6e8788
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ use termcolor::{ColorChoice, StandardStream};
let preference = argv.get_flag("color").unwrap_or("auto");
let mut choice = preference.parse::<ColorChoice>()?;
if choice == ColorChoice::Auto && !std::io::stdin().is_terminal() {
if choice == ColorChoice::Auto && !std::io::stdout().is_terminal() {
choice = ColorChoice::Never;
}
let stdout = StandardStream::stdout(choice);
Expand Down

0 comments on commit d6e8788

Please sign in to comment.