Skip to content

Commit

Permalink
Rollup merge of #117322 - onur-ozkan:fix-suppressed-outputs, r=Kobzol
Browse files Browse the repository at this point in the history
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 #117315

cc `@Kobzol`
  • Loading branch information
workingjubilee authored Oct 29, 2023
2 parents 577f86d + 236f6ba commit 771b255
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 771b255

Please sign in to comment.