mirror of
https://github.com/orhun/git-cliff.git
synced 2024-09-17 10:17:07 +03:00
feat(command): log the output of failed external commands
This commit is contained in:
parent
be87608002
commit
205cdbb391
@ -48,6 +48,12 @@ pub fn run(
|
||||
if output.status.success() {
|
||||
Ok(str::from_utf8(&output.stdout)?.to_string())
|
||||
} else {
|
||||
for output in [output.stdout, output.stderr] {
|
||||
let output = str::from_utf8(&output)?.to_string();
|
||||
if !output.is_empty() {
|
||||
log::error!("{}", output);
|
||||
}
|
||||
}
|
||||
Err(IoError::new(
|
||||
IoErrorKind::Other,
|
||||
format!("command exited with {:?}", output.status),
|
||||
|
Loading…
Reference in New Issue
Block a user