Skip to content

Commit 0a5c05a

Browse files
authored
Fix non-unicode stderr (#166)
1 parent ca73425 commit 0a5c05a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/build/parse.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,9 @@ fn generate_ast(
335335
.output()
336336
.expect("Error converting .res to .ast"),
337337
) {
338-
let stderr = std::str::from_utf8(&res_to_ast.stderr).expect("Expect StdErr to be non-null");
339-
if helpers::contains_ascii_characters(stderr) {
338+
let stderr = String::from_utf8_lossy(&res_to_ast.stderr).to_string();
339+
340+
if helpers::contains_ascii_characters(&stderr) {
340341
if res_to_ast.status.success() {
341342
Ok((ast_path, Some(stderr.to_string())))
342343
} else {

0 commit comments

Comments
 (0)