Skip to content

Commit

Permalink
make failure logs less verbose
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Mar 21, 2024
1 parent c86f3ac commit 7ffc92c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1008,16 +1008,19 @@ impl Build {
};
let result = if !output.status.success() {
if print_error {
println!(
"\n\ncommand did not execute successfully: {:?}\n\
expected success, got: {}\n\n\
stdout ----\n{}\n\
stderr ----\n{}\n\n",
command.command,
output.status,
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
);
println!("\n\nCommand did not execute successfully. Add `-v` to see more details.");
self.verbose(|| {
println!(
"\nCommand: {:?}\n\
Expected success, got: {}\n\n\
STDOUT ----\n{}\n\
STDERR ----\n{}\n\n",
command.command,
output.status,
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
)
});
}
Err(())
} else {
Expand Down

0 comments on commit 7ffc92c

Please sign in to comment.