Skip to content

Commit d0b6de0

Browse files
committed
Rewatch: fix non-unicode stderr
1 parent 71a363c commit d0b6de0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rewatch/src/build/parse.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,8 @@ fn generate_ast(
332332
.expect("Error converting .res to .ast"),
333333
) {
334334
Some(res_to_ast) => {
335-
let stderr = std::str::from_utf8(&res_to_ast.stderr).expect("Expect StdErr to be non-null");
335+
let stderr = String::from_utf8_lossy(&res_to_ast.stderr).to_string();
336+
336337
if helpers::contains_ascii_characters(stderr) {
337338
if res_to_ast.status.success() {
338339
Ok((ast_path, Some(stderr.to_string())))

0 commit comments

Comments
 (0)