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
Gbp-Pq: Name u-fix-exec.patch
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())
}