Skip to content

Commit 9e55310

Browse files
committed
replaced resume_unwind with process::exit to fix
bootstrap panic when running x fmt --check. running x fmt --check
1 parent 6d3f1be commit 9e55310

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/bootstrap/lib.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -1632,13 +1632,10 @@ fn chmod(_path: &Path, _perms: u32) {}
16321632
/// If the test is running and code is an error code, it will cause a panic.
16331633
fn detail_exit(code: i32) -> ! {
16341634
// Successful exit
1635-
if code == 0 {
1636-
std::process::exit(0);
1637-
}
1638-
if cfg!(test) {
1635+
if cfg!(test) && code != 0 {
16391636
panic!("status code: {}", code);
16401637
} else {
1641-
std::panic::resume_unwind(Box::new(code));
1638+
std::process::exit(code);
16421639
}
16431640
}
16441641

0 commit comments

Comments
 (0)