rustbuild: fix bad usage of UNIX exec() in rustc wrapper
exec never returns, it replaces the current process. so anything after it is unreachable. that's not how exec_cmd() is used in the surrounding code
This commit is contained in:
parent
c70986264b
commit
0cf17e750d
@ -186,13 +186,6 @@ fn main() {
|
||||
std::process::exit(code);
|
||||
}
|
||||
|
||||
#[cfg(unix)]
|
||||
fn exec_cmd(cmd: &mut Command) -> io::Result<i32> {
|
||||
use std::os::unix::process::CommandExt;
|
||||
Err(cmd.exec())
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
fn exec_cmd(cmd: &mut Command) -> io::Result<i32> {
|
||||
cmd.status().map(|status| status.code().unwrap())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user