Skip to content

Commit cea707d

Browse files
committed
emit old upstream warning no matter the build step
1 parent 94e9c4c commit cea707d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/bootstrap/src/core/build_steps/format.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::sync::mpsc::SyncSender;
77
use std::sync::Mutex;
88

99
use build_helper::ci::CiEnv;
10-
use build_helper::git::{get_git_modified_files, warn_old_master_branch};
10+
use build_helper::git::get_git_modified_files;
1111
use ignore::WalkBuilder;
1212

1313
use crate::core::builder::Builder;
@@ -93,8 +93,6 @@ fn get_modified_rs_files(build: &Builder<'_>) -> Result<Option<Vec<String>>, Str
9393
if !verify_rustfmt_version(build) {
9494
return Ok(None);
9595
}
96-
warn_old_master_branch(&build.config.git_config(), &build.config.src)
97-
.map_err(|e| e.to_string())?;
9896
get_git_modified_files(&build.config.git_config(), Some(&build.config.src), &["rs"])
9997
}
10098

src/bootstrap/src/core/sanity.rs

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ use std::ffi::{OsStr, OsString};
1515
use std::path::PathBuf;
1616
use std::{env, fs};
1717

18+
use build_helper::git::warn_old_master_branch;
19+
1820
#[cfg(not(feature = "bootstrap-self-test"))]
1921
use crate::builder::Builder;
2022
use crate::builder::Kind;
@@ -379,4 +381,8 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
379381
if let Some(ref s) = build.config.ccache {
380382
cmd_finder.must_have(s);
381383
}
384+
385+
warn_old_master_branch(&build.config.git_config(), &build.config.src)
386+
.map_err(|e| e.to_string())
387+
.unwrap();
382388
}

0 commit comments

Comments
 (0)