Skip to content

Commit

Permalink
failsafe/dist: if a toolchain dir exists, remove it
Browse files Browse the repository at this point in the history
This avoids a state of a server, where it fails
repeatedly, and hence just slows down the compilation
process. This is only observable via launching the
cachepot clientside dispatcher or looking into
the cachepot-dist server logs.
  • Loading branch information
drahnr authored and Xanewok committed Aug 13, 2021
1 parent cbeee04 commit 42f0557
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/bin/cachepot-dist/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,13 @@ impl OverlayBuilder {
entry.build_count += 1;
entry.clone()
} else {
if toolchain_dir.exists() {
warn!(
"Toolchain directory for {} already exists, removing",
tc.archive_id
);
fs::remove_dir_all(&toolchain_dir)?;
}
trace!("Creating toolchain directory for {}", tc.archive_id);
fs::create_dir(&toolchain_dir)?;

Expand Down

0 comments on commit 42f0557

Please sign in to comment.