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 <[email protected]>
  • Loading branch information
onur-ozkan committed Mar 21, 2024
1 parent c86f3ac commit 796105e
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1009,15 +1009,23 @@ 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,
"\n\nCommand did not execute successfully.\
\nExpected success, got: {}",
output.status,
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
);

if !self.is_verbose() {
println!("Add `-v` to see more details.\n");
}

self.verbose(|| {
println!(
"\nSTDOUT ----\n{}\n\
STDERR ----\n{}\n",
String::from_utf8_lossy(&output.stdout),
String::from_utf8_lossy(&output.stderr)
)
});
}
Err(())
} else {
Expand Down

0 comments on commit 796105e

Please sign in to comment.