Skip to content

Commit

Permalink
fix(error): Never show unrequested color
Browse files Browse the repository at this point in the history
If the user prints a raw error, it may include color even if the user
turned it off at runtime.  Now we'll be more conservative and never show
color for raw errors.
  • Loading branch information
epage committed Oct 25, 2021
1 parent b82615f commit 9e8a15f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ impl Message {
fn formatted(&self) -> Cow<Colorizer> {
match self {
Message::Raw(s) => {
let mut c = Colorizer::new(true, ColorChoice::Auto);
let mut c = Colorizer::new(true, ColorChoice::Never);
start_error(&mut c, s);
Cow::Owned(c)
}
Expand Down

0 comments on commit 9e8a15f

Please sign in to comment.