Skip to content

Commit 40b1c5b

Browse files
authored
Rollup merge of #113551 - jyn514:dry-run-exclude, r=ozkanonur
bootstrap: Don't print "Skipping" twice Bootstrap executes itself twice: once with DryRun::SelfCheck and DryRun::Disabled. Change it not to print the "Skipping" message if SelfCheck is enabled. See https://github.com/rust-lang/rust/actions/runs/5503931599/jobs/10029625567?pr=113514#step:24:772.
2 parents 3413ace + 8c91c8f commit 40b1c5b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/bootstrap/builder.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::process::Command;
1313
use std::time::{Duration, Instant};
1414

1515
use crate::cache::{Cache, Interned, INTERNER};
16-
use crate::config::{SplitDebuginfo, TargetSelection};
16+
use crate::config::{DryRun, SplitDebuginfo, TargetSelection};
1717
use crate::doc;
1818
use crate::flags::{Color, Subcommand};
1919
use crate::install;
@@ -281,11 +281,15 @@ impl StepDescription {
281281

282282
fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
283283
if builder.config.exclude.iter().any(|e| pathset.has(&e, builder.kind)) {
284-
println!("Skipping {:?} because it is excluded", pathset);
284+
if !matches!(builder.config.dry_run, DryRun::SelfCheck) {
285+
println!("Skipping {:?} because it is excluded", pathset);
286+
}
285287
return true;
286288
}
287289

288-
if !builder.config.exclude.is_empty() {
290+
if !builder.config.exclude.is_empty()
291+
&& !matches!(builder.config.dry_run, DryRun::SelfCheck)
292+
{
289293
builder.verbose(&format!(
290294
"{:?} not skipped for {:?} -- not in {:?}",
291295
pathset, self.name, builder.config.exclude

0 commit comments

Comments
 (0)