aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/lib.rs')
-rw-r--r--xtask/src/lib.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/xtask/src/lib.rs b/xtask/src/lib.rs
index 55cdee491..f48045d17 100644
--- a/xtask/src/lib.rs
+++ b/xtask/src/lib.rs
@@ -139,12 +139,15 @@ pub fn run_pre_cache() -> Result<()> {
139 } 139 }
140 140
141 fs2::remove_file("./target/.rustc_info.json")?; 141 fs2::remove_file("./target/.rustc_info.json")?;
142 let to_delete = ["ra_", "heavy_test"]; 142 let to_delete = ["ra_", "heavy_test", "xtask"];
143 for &dir in ["./target/debug/deps", "target/debug/.fingerprint"].iter() { 143 for &dir in ["./target/debug/deps", "target/debug/.fingerprint"].iter() {
144 for entry in Path::new(dir).read_dir()? { 144 for entry in Path::new(dir).read_dir()? {
145 let entry = entry?; 145 let entry = entry?;
146 if to_delete.iter().any(|&it| entry.path().display().to_string().contains(it)) { 146 if to_delete.iter().any(|&it| entry.path().display().to_string().contains(it)) {
147 rm_rf(&entry.path())? 147 // Can't delete yourself on windows :-(
148 if !entry.path().ends_with("xtask.exe") {
149 rm_rf(&entry.path())?
150 }
148 } 151 }
149 } 152 }
150 } 153 }