mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(diagnostics): do not print ansi color codes in non-TTYs (#3624)
closes #3539 upstream issue https://github.com/zkat/miette/issues/380
This commit is contained in:
parent
f9c08d1e28
commit
e6ad3fbf16
1 changed files with 1 additions and 1 deletions
|
|
@ -64,7 +64,7 @@ impl Default for GraphicalTheme {
|
|||
fn default() -> Self {
|
||||
match std::env::var("NO_COLOR") {
|
||||
_ if !std::io::stdout().is_terminal() || !std::io::stderr().is_terminal() => {
|
||||
Self::ascii()
|
||||
Self::none()
|
||||
}
|
||||
Ok(string) if string != "0" => Self::unicode_nocolor(),
|
||||
_ => Self::unicode(),
|
||||
|
|
|
|||
Loading…
Reference in a new issue