mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
Improve error message when command fails to run
This commit is contained in:
parent
9595101065
commit
b29c147a5d
1 changed files with 4 additions and 1 deletions
|
@ -83,5 +83,8 @@ fn split_args(args: Vec<String>) -> Vec<Vec<String>> {
|
|||
}
|
||||
|
||||
pub fn run_command(command: &mut Command) {
|
||||
command.ensure_success().unwrap();
|
||||
if let Err(err) = command.ensure_success() {
|
||||
println!("{}", err);
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue