Skip to content

Commit 796105e

Browse files
committed
make failure logs less verbose
Signed-off-by: onur-ozkan <[email protected]>
1 parent c86f3ac commit 796105e

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/bootstrap/src/lib.rs

+15-7
Original file line numberDiff line numberDiff line change
@@ -1009,15 +1009,23 @@ impl Build {
10091009
let result = if !output.status.success() {
10101010
if print_error {
10111011
println!(
1012-
"\n\ncommand did not execute successfully: {:?}\n\
1013-
expected success, got: {}\n\n\
1014-
stdout ----\n{}\n\
1015-
stderr ----\n{}\n\n",
1016-
command.command,
1012+
"\n\nCommand did not execute successfully.\
1013+
\nExpected success, got: {}",
10171014
output.status,
1018-
String::from_utf8_lossy(&output.stdout),
1019-
String::from_utf8_lossy(&output.stderr)
10201015
);
1016+
1017+
if !self.is_verbose() {
1018+
println!("Add `-v` to see more details.\n");
1019+
}
1020+
1021+
self.verbose(|| {
1022+
println!(
1023+
"\nSTDOUT ----\n{}\n\
1024+
STDERR ----\n{}\n",
1025+
String::from_utf8_lossy(&output.stdout),
1026+
String::from_utf8_lossy(&output.stderr)
1027+
)
1028+
});
10211029
}
10221030
Err(())
10231031
} else {

0 commit comments

Comments
 (0)