Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 483dcbc

Browse files
authored
Merge pull request #1482 from ehuss/clear-target
Clear CARGO_TARGET_DIR for tests.
2 parents bb3a57c + 9b1147f commit 483dcbc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/support/client/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ impl Project {
5959
let mut cmd = Command::new(rls_exe());
6060
cmd.current_dir(self.root());
6161
cmd.stderr(Stdio::inherit());
62+
// If `CARGO_TARGET_DIR` is set (such as in rust-lang/rust), don't
63+
// reuse it. Each test needs its own target directory so they don't
64+
// stomp on each other's files.
65+
cmd.env_remove("CARGO_TARGET_DIR");
6266

6367
cmd
6468
}

0 commit comments

Comments
 (0)