Skip to content

Commit

Permalink
chore(cli): use spawn to display emcc's stdout and stderr
Browse files Browse the repository at this point in the history
Co-authored-by: Nbiba Bedis <bedisnbiba@gmail.com>
  • Loading branch information
amaanq and sigmaSd committed Feb 7, 2024
1 parent d14d898 commit 9446bf6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cli/loader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,12 @@ impl Loader {
}

command.arg("parser.c");
let output = command.output().context("Failed to run emcc command")?;
if !output.status.success() {
return Err(anyhow!(
"emcc command failed - {}",
String::from_utf8_lossy(&output.stderr)
));
let status = command
.spawn()
.with_context(|| "Failed to run emcc command")?
.wait()?;
if !status.success() {
return Err(anyhow!("emcc command failed"));
}

fs::rename(src_path.join(output_name), output_path)
Expand Down

0 comments on commit 9446bf6

Please sign in to comment.