handler_opts.color(false) should disable color

This commit is contained in:
Christopher Durham 2022-03-17 20:29:56 -05:00 committed by GitHub
parent 77cdfc45c9
commit c85704ecc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -150,7 +150,9 @@ impl MietteHandlerOpts {
None if supports_unicode::on(Stream::Stderr) => ThemeCharacters::unicode(),
None => ThemeCharacters::ascii(),
};
let styles = if self.rgb_colors == Some(true) {
let styles = if self.color == Some(false) {
ThemeStyles::none()
} else if self.rgb_colors == Some(true) {
ThemeStyles::rgb()
} else if self.ansi_colors == Some(true) {
ThemeStyles::ansi()