display errors

This commit is contained in:
blek 2023-10-29 19:25:33 +10:00
parent 8d5d739568
commit 32375127a9
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,11 @@ fn system(cmd: &str, args: &[&str]) -> String {
.args(args) .args(args)
.output() .output()
.unwrap(); .unwrap();
if out.stderr.len() != 0 {
panic!("Got this while running {cmd} with \"{}\": {}", args.join(" "), String::from_utf8(out.stderr).unwrap())
}
String::from_utf8(out.stdout).unwrap() String::from_utf8(out.stdout).unwrap()
} }