Skip to content

Commit

Permalink
Auto merge of #48340 - Mark-Simulacrum:beta-next, r=kennytm
Browse files Browse the repository at this point in the history
[beta] Backport #48252

Backport of #48252. It fixes a critical failure in what we run on CI that was caught after we branched beta.
  • Loading branch information
bors committed Feb 19, 2018
2 parents da1f1b5 + d64aee0 commit 030fc63
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 7 additions & 1 deletion src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl StepDescription {
}

if !attempted_run {
eprintln!("Warning: no rules matched {}.", path.display());
panic!("Error: no rules matched {}.", path.display());
}
}
}
Expand Down Expand Up @@ -385,6 +385,12 @@ impl<'a> Builder<'a> {
Subcommand::Clean { .. } => panic!(),
};

if let Some(path) = paths.get(0) {
if path == Path::new("nonexistent/path/to/trigger/cargo/metadata") {
return;
}
}

let builder = Builder {
build,
top_stage: build.config.stage.unwrap_or(2),
Expand Down
8 changes: 2 additions & 6 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,7 @@ Arguments:
let src = matches.opt_str("src").map(PathBuf::from)
.or_else(|| env::var_os("SRC").map(PathBuf::from))
.unwrap_or(cwd.clone());
let paths = matches.free[1..].iter().map(|p| {
cwd.join(p).strip_prefix(&src).expect("paths passed to be inside checkout").into()
}).collect::<Vec<PathBuf>>();
let paths = matches.free[1..].iter().map(|p| p.into()).collect::<Vec<PathBuf>>();

let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| {
if fs::metadata("config.toml").is_ok() {
Expand Down Expand Up @@ -380,9 +378,7 @@ Arguments:
cmd,
incremental: matches.opt_present("incremental"),
exclude: split(matches.opt_strs("exclude"))
.into_iter().map(|p| {
cwd.join(p).strip_prefix(&src).expect("paths to be inside checkout").into()
}).collect::<Vec<_>>(),
.into_iter().map(|p| p.into()).collect::<Vec<_>>(),
src,
}
}
Expand Down

0 comments on commit 030fc63

Please sign in to comment.