We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d3f1be commit 9e55310Copy full SHA for 9e55310
src/bootstrap/lib.rs
@@ -1632,13 +1632,10 @@ fn chmod(_path: &Path, _perms: u32) {}
1632
/// If the test is running and code is an error code, it will cause a panic.
1633
fn detail_exit(code: i32) -> ! {
1634
// Successful exit
1635
- if code == 0 {
1636
- std::process::exit(0);
1637
- }
1638
- if cfg!(test) {
+ if cfg!(test) && code != 0 {
1639
panic!("status code: {}", code);
1640
} else {
1641
- std::panic::resume_unwind(Box::new(code));
+ std::process::exit(code);
1642
}
1643
1644
0 commit comments