Skip to content

Commit ffb0302

Browse files
authored
Unrolled build for rust-lang#122831
Rollup merge of rust-lang#122831 - onur-ozkan:less-verbose-fail-logs, r=clubby789 make failure logs less verbose Resolves rust-lang#122706 Logs without verbose flag: ![image](https://github.com/rust-lang/rust/assets/39852038/f2fc2d35-0954-44b0-bedc-045afedaabe8) Logs with verbose flag: ![image](https://github.com/rust-lang/rust/assets/39852038/b9308655-ad31-4527-a1be-5a62a78ac469) I decided to exclude command from the log since it's already included in verbose mode. cc ```@Nilstrieb```
2 parents 0ad927c + 796105e commit ffb0302

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)