wgsl: Do not make error output colorful when the terminal is dumb

This commit is contained in:
rhysd authored and Dzmitry Malyshau committed 2022-01-29 08:52:36 -05:00
1 parent f98053aa3c
commit d6f8958b34
1 file changed
+1 -1
+1 -1
View File
@@ -1181,7 +1181,7 @@ impl ParseError {
pub fn emit_to_stderr_with_path(&self, source: &str, path: &str) {
let files = SimpleFile::new(path, source);
let config = codespan_reporting::term::Config::default();
let writer = StandardStream::stderr(ColorChoice::Always);
let writer = StandardStream::stderr(ColorChoice::Auto);
term::emit(&mut writer.lock(), &config, &files, &self.diagnostic())
.expect("cannot write error");
}