Skip to content

Commit

Permalink
oci-cli-wrapper: improve logging on failure
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Berning <[email protected]>
  • Loading branch information
sam-berning committed Nov 1, 2024
1 parent dbba407 commit ebef61d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/oci-cli-wrapper/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ impl CommandLine {
ensure!(
output.status.success(),
error::OperationFailedSnafu {
message: String::from_utf8_lossy(&output.stderr),
message: format!(
"status: {} stderr: {} stdout: {}",
&output.status,
String::from_utf8_lossy(&output.stderr),
String::from_utf8_lossy(&output.stdout)
),
program: self.path.clone(),
args: args.iter().map(|x| x.to_string()).collect::<Vec<_>>()
}
Expand Down

0 comments on commit ebef61d

Please sign in to comment.