copy exit status of build command

This commit is contained in:
Crispy 2023-09-07 10:59:26 +02:00
parent 43e20b46c7
commit b6e74935f1

View file

@ -12,10 +12,13 @@ fn main() {
let cmd = &args[1];
println!("starting build");
let process = Command::new(cmd).args(&args[2..]).status();
let exit_status = Command::new(cmd).args(&args[2..]).status();
println!("\n");
println!("{:?}", process);
let time_taken = start_time.elapsed().unwrap();
println!("Took {:?}", time_taken);
println!("{:?}", exit_status);
if let Some(status) = exit_status.ok().and_then(|s| s.code()) {
std::process::exit(status);
}
}