From 8c91c8fe8455cd30954c71f0bc72d7b480c6d185 Mon Sep 17 00:00:00 2001 From: jyn Date: Mon, 10 Jul 2023 15:15:57 -0500 Subject: [PATCH] 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. --- src/bootstrap/builder.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index 05b66f94727..4a7ce146e38 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -13,7 +13,7 @@ use std::time::{Duration, Instant}; use crate::cache::{Cache, Interned, INTERNER}; -use crate::config::{SplitDebuginfo, TargetSelection}; +use crate::config::{DryRun, SplitDebuginfo, TargetSelection}; use crate::doc; use crate::flags::{Color, Subcommand}; use crate::install; @@ -281,11 +281,15 @@ fn maybe_run(&self, builder: &Builder<'_>, pathsets: Vec) { fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool { if builder.config.exclude.iter().any(|e| pathset.has(&e, builder.kind)) { - println!("Skipping {:?} because it is excluded", pathset); + if !matches!(builder.config.dry_run, DryRun::SelfCheck) { + println!("Skipping {:?} because it is excluded", pathset); + } return true; } - if !builder.config.exclude.is_empty() { + if !builder.config.exclude.is_empty() + && !matches!(builder.config.dry_run, DryRun::SelfCheck) + { builder.verbose(&format!( "{:?} not skipped for {:?} -- not in {:?}", pathset, self.name, builder.config.exclude