diff options
author | Christopher Durham <[email protected]> | 2020-03-03 04:30:14 +0000 |
---|---|---|
committer | CAD97 <[email protected]> | 2020-03-03 04:50:10 +0000 |
commit | e070553cef4bb5ccd9faacc248179c42d738624f (patch) | |
tree | 7c14e924e679997af03002fc6c02c59b37727596 /xtask | |
parent | ce5684216eda52a6da6a2933a980bd5655da61b8 (diff) |
Clean xtask partial artifacts in `xtask pre-cache`
Diffstat (limited to 'xtask')
-rw-r--r-- | xtask/src/lib.rs | 7 |
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 | } |