Skip to content

Commit 0533c8d

Browse files
authored
Rewatch: fix non-unicode stderr (#7613)
1 parent 71a363c commit 0533c8d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rewatch/src/build/parse.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,9 @@ 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");
336-
if helpers::contains_ascii_characters(stderr) {
335+
let stderr = String::from_utf8_lossy(&res_to_ast.stderr).to_string();
336+
337+
if helpers::contains_ascii_characters(&stderr) {
337338
if res_to_ast.status.success() {
338339
Ok((ast_path, Some(stderr.to_string())))
339340
} else {

0 commit comments

Comments
 (0)