Moved to atty

This commit is contained in:
Sylvestre Ledru 2021-02-11 16:00:26 +01:00
parent 26aa1f346e
commit bd6b958655

View file

@ -622,7 +622,7 @@ fn display_file_name(
let mut width = UnicodeWidthStr::width(&*name);
let color = match options.opt_str("color") {
None => stdout_isatty(),
None => atty::is(atty::Stream::Stdout),
Some(val) => match val.as_ref() {
"always" | "yes" | "force" => true,
"auto" | "tty" | "if-tty" => atty::is(atty::Stream::Stdout),