Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions collector/src/rustc-fake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,10 @@ fn process_self_profile_output(prof_out_dir: PathBuf, args: &[OsString]) {
#[cfg(windows)]
fn exec(cmd: &mut Command) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW using return type -> ! (like the Unix version) would have caught this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I forgot that part when I posted @mystor's suggestion (#1366 (comment)).

let cmd_d = format!("{:?}", cmd);
if let Err(e) = cmd.status() {
panic!("failed to execute `{}`: {}", cmd_d, e);
match cmd.status() {
Ok(status) if !status.success() => std::process::exit(1),
Ok(_) => {},
Err(e) => panic!("failed to execute `{}`: {}", cmd_d, e),
}
}

Expand Down