mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
chore: print err if not empty
This commit is contained in:
parent
9024d60825
commit
fcb01b9155
1 changed files with 6 additions and 0 deletions
|
|
@ -353,6 +353,12 @@ pub fn command_output(shell: &str, command: &str) -> String {
|
||||||
.output()
|
.output()
|
||||||
.expect("failed to execute process");
|
.expect("failed to execute process");
|
||||||
|
|
||||||
|
let err = String::from_utf8_lossy(&output.stderr);
|
||||||
|
if !err.is_empty() {
|
||||||
|
eprintln!("Error while executing command: {}", command);
|
||||||
|
eprintln!(" {}", err.replace("\n", "\n "));
|
||||||
|
}
|
||||||
|
|
||||||
String::from_utf8_lossy(&output.stdout).to_string()
|
String::from_utf8_lossy(&output.stdout).to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue