mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-26 17:31:05 +01:00
wgsl: Do not make error output colorful when the terminal is dumb
This commit is contained in:
1 parent
f98053aa3c
commit
d6f8958b34
1 file changed
+1
-1
@@ -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");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user