Skip to content

Commit

Permalink
Unrolled build for rust-lang#117322
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#117322 - onur-ozkan:fix-suppressed-outputs, r=Kobzol

change default output mode of `BootstrapCommand`

`SuppressOnSuccess` on `BootstrapCommand` is a problematic default mode as it affects the logs during the bootstrapping (as shown in the screenshot below). The default behavior should be to print everything unless we explicitly modify the behavior within build steps.

![image](https://github.com/rust-lang/rust/assets/39852038/8dbaaeb2-0656-4ff9-8e48-1ac0734a913f)

Fixes rust-lang#117315

cc `@Kobzol`
  • Loading branch information
rust-timer authored Oct 29, 2023
2 parents 2106b63 + 236f6ba commit 0d52265
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,11 @@ impl Build {
.args(&["diff-index", "--quiet", "HEAD"])
.current_dir(&absolute_path),
)
.allow_failure(),
.allow_failure()
.output_mode(match self.is_verbose() {
true => OutputMode::PrintAll,
false => OutputMode::PrintOutput,
}),
);
if has_local_modifications {
self.run(Command::new("git").args(&["stash", "push"]).current_dir(&absolute_path));
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/utils/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<'a> From<&'a mut Command> for BootstrapCommand<'a> {
Self {
command,
failure_behavior: BehaviorOnFailure::Exit,
output_mode: OutputMode::SuppressOnSuccess,
output_mode: OutputMode::PrintAll,
}
}
}

0 comments on commit 0d52265

Please sign in to comment.