diff --git a/src/main.rs b/src/main.rs index 9f20560..6317c24 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); + } }