fix(colors): treat no-color mode as no-color instead of narratable (#94)

Fixes: https://github.com/zkat/miette/issues/93

BREAKING CHANGE: NO_COLOR no longer triggers the narrated handler. Use
NO_GRAPHICS instead.
This commit is contained in:
Kat Marchán 2022-01-08 09:11:19 -08:00 committed by GitHub
parent ecf0502758
commit 9dcce5f1bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -188,8 +188,8 @@ impl MietteHandlerOpts {
!force_narrated
} else if let Some(force_graphical) = self.force_graphical {
force_graphical
} else if let Some(info) = supports_color::on(Stream::Stderr) {
info.has_basic
} else if let Ok(env) = std::env::var("NO_GRAPHICS") {
env == "0"
} else {
false
}