Skip to content

Commit

Permalink
Enable ANSI colors on Windows 10 (#3583)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Mar 17, 2023
1 parent 1dd3cbd commit 50f9db2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/ruff_cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;

Expand Down

0 comments on commit 50f9db2

Please sign in to comment.