Skip to content

Commit 431edf5

Browse files
committed
Fix Windows
1 parent 9525719 commit 431edf5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cargo-miri/bin.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,8 @@ fn exec(mut cmd: Command) -> ! {
255255
// On non-Unix imitate POSIX exec as closely as we can
256256
#[cfg(not(unix))]
257257
{
258-
exec(cmd);
259-
// Our imitation of exec only returns upon success
260-
std::process::exit(0)
258+
let exit_status = cmd.status().expect("failed to run command");
259+
std::process::exit(exit_status.code().unwrap_or(-1));
261260
}
262261
// On Unix targets, actually exec
263262
// If exec returns, process setup has failed. This is the same error condition as the expect in

0 commit comments

Comments
 (0)