Always enable colors on Windows, closes #469

This commit is contained in:
sharkdp 2020-04-15 18:47:18 +02:00
parent d63c63be8c
commit a4e78519c4

View file

@ -147,7 +147,7 @@ fn run() -> Result<ExitCode> {
let path_separator = matches.value_of("path-separator").map(|str| str.to_owned()); let path_separator = matches.value_of("path-separator").map(|str| str.to_owned());
#[cfg(windows)] #[cfg(windows)]
let colored_output = colored_output && ansi_term::enable_ansi_support().is_ok(); ansi_term::enable_ansi_support().ok();
let ls_colors = if colored_output { let ls_colors = if colored_output {
Some(LsColors::from_env().unwrap_or_default()) Some(LsColors::from_env().unwrap_or_default())