mirror of https://github.com/zkat/miette.git
fix: setting NO_COLOR should not print ansi codes for non-terminals
closes #380
This commit is contained in:
parent
b82cc81b8e
commit
b30ef81214
|
|
@ -71,7 +71,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 New Issue