cli: Include file path in WGSL parse error

This commit is contained in:
rhysd authored and Dzmitry Malyshau committed 2022-01-29 08:52:15 -05:00
1 parent 0afa8fcb4f
commit f98053aa3c
1 file changed
+2 -1
+2 -1
View File
@@ -281,7 +281,8 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
match result {
Ok(v) => (v, Some(input)),
Err(ref e) => {
e.emit_to_stderr(&input);
let path = input_path.to_string_lossy();
e.emit_to_stderr_with_path(&input, &path);
return Err(CliError("Could not parse WGSL").into());
}
}