Add exit code to command failed msg (#5898)

pull/5204/merge
lesleyrs 2 years ago committed by GitHub
parent ea3293b4da
commit af1157f37c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -5043,7 +5043,10 @@ async fn shell_impl_async(
log::error!("Shell error: {}", err); log::error!("Shell error: {}", err);
bail!("Shell error: {}", err); bail!("Shell error: {}", err);
} }
bail!("Shell command failed"); match output.status.code() {
Some(exit_code) => bail!("Shell command failed: status {}", exit_code),
None => bail!("Shell command failed"),
}
} else if !output.stderr.is_empty() { } else if !output.stderr.is_empty() {
log::debug!( log::debug!(
"Command printed to stderr: {}", "Command printed to stderr: {}",

Loading…
Cancel
Save