Moved to atty

This commit is contained in:
Sylvestre Ledru
2021-02-12 11:37:32 +01:00
parent 26aa1f346e
commit bd6b958655
+1 -1
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),