Skip to content

Commit

Permalink
Print stderr on error
Browse files Browse the repository at this point in the history
  • Loading branch information
deuszx committed Feb 21, 2025
1 parent 74a0942 commit 03c41f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions linera-base/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ impl CommandExt for tokio::process::Command {
.with_context(|| self.description())?;
ensure!(
output.status.success(),
"{}: got non-zero error code {}",
"{}: got non-zero error code {}. Stderr: \n{:?}\n",
self.description(),
output.status
output.status,
String::from_utf8(output.stderr),
);
String::from_utf8(output.stdout).with_context(|| self.description())
}
Expand Down

0 comments on commit 03c41f0

Please sign in to comment.