Skip to content

Commit

Permalink
Gracefully exit when --keep-stage used on clean source tree
Browse files Browse the repository at this point in the history
  • Loading branch information
Teapot4195 committed Jan 28, 2023
1 parent d6f0642 commit 65186e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,13 @@ impl Build {
return Vec::new();
}

if !stamp.exists() {
eprintln!(
"Warning: Unable to find the stamp file, did you try to keep a nonexistent build stage?"
);
crate::detail_exit(1);
}

let mut paths = Vec::new();
let contents = t!(fs::read(stamp), &stamp);
// This is the method we use for extracting paths from the stamp file passed to us. See
Expand Down

0 comments on commit 65186e0

Please sign in to comment.