copy exit status of build command
This commit is contained in:
parent
43e20b46c7
commit
b6e74935f1
1 changed files with 6 additions and 3 deletions
|
@ -12,10 +12,13 @@ fn main() {
|
||||||
let cmd = &args[1];
|
let cmd = &args[1];
|
||||||
|
|
||||||
println!("starting build");
|
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!("\n");
|
||||||
println!("{:?}", process);
|
|
||||||
let time_taken = start_time.elapsed().unwrap();
|
let time_taken = start_time.elapsed().unwrap();
|
||||||
println!("Took {:?}", time_taken);
|
println!("Took {:?}", time_taken);
|
||||||
|
|
||||||
|
println!("{:?}", exit_status);
|
||||||
|
if let Some(status) = exit_status.ok().and_then(|s| s.code()) {
|
||||||
|
std::process::exit(status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue