Improve error message when command fails to run

This commit is contained in:
Damien Elmes 2023-09-07 14:55:52 +10:00
parent 9595101065
commit b29c147a5d

View file

@ -83,5 +83,8 @@ fn split_args(args: Vec<String>) -> Vec<Vec<String>> {
} }
pub fn run_command(command: &mut Command) { pub fn run_command(command: &mut Command) {
command.ensure_success().unwrap(); if let Err(err) = command.ensure_success() {
println!("{}", err);
std::process::exit(1);
}
} }