diff --git a/src/main.rs b/src/main.rs index 434f35d..b0521fb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -145,6 +145,10 @@ fn main() { fn build_hyperfine_options<'a>( matches: &ArgMatches<'a>, ) -> Result> { + // Enabled ANSI colors on Windows 10 + #[cfg(windows)] + colored::control::set_virtual_terminal(true).unwrap(); + let mut options = HyperfineOptions::default(); let param_to_u64 = |param| { matches @@ -216,11 +220,6 @@ fn build_hyperfine_options<'a>( } }; - // We default Windows to NoColor if full had been specified. - if cfg!(windows) && options.output_style == OutputStyleOption::Full { - options.output_style = OutputStyleOption::NoColor; - } - match options.output_style { OutputStyleOption::Basic | OutputStyleOption::NoColor => { colored::control::set_override(false)