diff --git a/crates/ruff_cli/src/lib.rs b/crates/ruff_cli/src/lib.rs index 0fce84ded8423..b817d0df67f30 100644 --- a/crates/ruff_cli/src/lib.rs +++ b/crates/ruff_cli/src/lib.rs @@ -69,6 +69,10 @@ quoting the executed command, along with the relevant file contents and `pyproje })); } + // Enabled ANSI colors on Windows 10. + #[cfg(windows)] + assert!(colored::control::set_virtual_terminal(true).is_ok()); + let log_level: LogLevel = (&log_level_args).into(); set_up_logging(&log_level)?;