Skip to content

Commit 1e8fbb1

Browse files
committed
Auto merge of #48340 - Mark-Simulacrum:beta-next, r=kennytm
[beta] Backport #48252 Backport of #48252. It fixes a critical failure in what we run on CI that was caught after we branched beta.
2 parents da1f1b5 + d64aee0 commit 1e8fbb1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/bootstrap/builder.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl StepDescription {
217217
}
218218

219219
if !attempted_run {
220-
eprintln!("Warning: no rules matched {}.", path.display());
220+
panic!("Error: no rules matched {}.", path.display());
221221
}
222222
}
223223
}
@@ -385,6 +385,12 @@ impl<'a> Builder<'a> {
385385
Subcommand::Clean { .. } => panic!(),
386386
};
387387

388+
if let Some(path) = paths.get(0) {
389+
if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
390+
return;
391+
}
392+
}
393+
388394
let builder = Builder {
389395
build,
390396
top_stage: build.config.stage.unwrap_or(2),

src/bootstrap/flags.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -278,9 +278,7 @@ Arguments:
278278
let src = matches.opt_str("src").map(PathBuf::from)
279279
.or_else(|| env::var_os("SRC").map(PathBuf::from))
280280
.unwrap_or(cwd.clone());
281-
let paths = matches.free[1..].iter().map(|p| {
282-
cwd.join(p).strip_prefix(&src).expect("paths passed to be inside checkout").into()
283-
}).collect::<Vec<PathBuf>>();
281+
let paths = matches.free[1..].iter().map(|p| p.into()).collect::<Vec<PathBuf>>();
284282

285283
let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| {
286284
if fs::metadata("config.toml").is_ok() {
@@ -380,9 +378,7 @@ Arguments:
380378
cmd,
381379
incremental: matches.opt_present("incremental"),
382380
exclude: split(matches.opt_strs("exclude"))
383-
.into_iter().map(|p| {
384-
cwd.join(p).strip_prefix(&src).expect("paths to be inside checkout").into()
385-
}).collect::<Vec<_>>(),
381+
.into_iter().map(|p| p.into()).collect::<Vec<_>>(),
386382
src,
387383
}
388384
}

0 commit comments

Comments
 (0)