Skip to content

Commit 31fb289

Browse files
Prevent cached build directory being used
1 parent 9b90af4 commit 31fb289

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,8 @@ impl Toolchain {
461461
let mut cargo = Command::new("cargo");
462462
cargo.arg(&format!("+{}", self.rustup_name()));
463463
cargo.current_dir(&cfg.args.test_dir);
464+
let _ = fs::remove_dir_all(
465+
cfg.args.test_dir.join(&format!("target-{}", self.rustup_name())));
464466
cargo.env("CARGO_TARGET_DIR", format!("target-{}", self.rustup_name()));
465467
if cfg.args.cargo_args.is_empty() {
466468
cargo.arg("build");

0 commit comments

Comments
 (0)