mirror of https://github.com/astral-sh/ruff
[ty] Enable virtual terminal on Windows (#19984)
## Summary Should hopefully fix https://github.com/astral-sh/ty/issues/1045
This commit is contained in:
parent
4242905b36
commit
10301f6190
|
|
@ -62,6 +62,10 @@ pub(crate) fn version() -> Result<()> {
|
|||
}
|
||||
|
||||
fn run_check(args: CheckCommand) -> anyhow::Result<ExitStatus> {
|
||||
// Enabled ANSI colors on Windows 10.
|
||||
#[cfg(windows)]
|
||||
assert!(colored::control::set_virtual_terminal(true).is_ok());
|
||||
|
||||
set_colored_override(args.color);
|
||||
|
||||
let verbosity = args.verbosity.level();
|
||||
|
|
|
|||
Loading…
Reference in New Issue