Skip to content

Commit 3c25313

Browse files
authored
Teach rustc-fake to tell the truth about subprocess exit statuses (#1366)
1 parent a2a1752 commit 3c25313

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

collector/src/rustc-fake.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,9 @@ fn process_self_profile_output(prof_out_dir: PathBuf, args: &[OsString]) {
467467
#[cfg(windows)]
468468
fn exec(cmd: &mut Command) {
469469
let cmd_d = format!("{:?}", cmd);
470-
if let Err(e) = cmd.status() {
471-
panic!("failed to execute `{}`: {}", cmd_d, e);
470+
match cmd.status() {
471+
Ok(status) => std::process::exit(status.code().unwrap_or(1)),
472+
Err(e) => panic!("failed to spawn `{}`: {}", cmd_d, e),
472473
}
473474
}
474475

0 commit comments

Comments
 (0)