chore(cli): use spawn to display emcc's stdout and stderr
Co-authored-by: Nbiba Bedis <bedisnbiba@gmail.com>
This commit is contained in:
parent
8759352542
commit
e4894ac8b4
1 changed files with 6 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue