Skip to content

Commit 7ffc92c

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

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/bootstrap/src/lib.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,16 +1008,19 @@ impl Build {
10081008
};
10091009
let result = if !output.status.success() {
10101010
if print_error {
1011-
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,
1017-
output.status,
1018-
String::from_utf8_lossy(&output.stdout),
1019-
String::from_utf8_lossy(&output.stderr)
1020-
);
1011+
println!("\n\nCommand did not execute successfully. Add `-v` to see more details.");
1012+
self.verbose(|| {
1013+
println!(
1014+
"\nCommand: {:?}\n\
1015+
Expected success, got: {}\n\n\
1016+
STDOUT ----\n{}\n\
1017+
STDERR ----\n{}\n\n",
1018+
command.command,
1019+
output.status,
1020+
String::from_utf8_lossy(&output.stdout),
1021+
String::from_utf8_lossy(&output.stderr)
1022+
)
1023+
});
10211024
}
10221025
Err(())
10231026
} else {

0 commit comments

Comments
 (0)