Add exit code to command failed msg (#5898)

This commit is contained in:
lesleyrs 2023-02-10 18:56:56 +01:00 committed by GitHub
parent ea3293b4da
commit af1157f37c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5043,7 +5043,10 @@ async fn shell_impl_async(
log::error!("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() {
log::debug!(
"Command printed to stderr: {}",