diff options
-rw-r--r-- | .github/workflows/ci.yaml | 2 | ||||
-rw-r--r-- | xtask/src/lib.rs | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3f41d32f7..50c4265cf 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml | |||
@@ -87,7 +87,7 @@ jobs: | |||
87 | 87 | ||
88 | - name: Prepare cache 2 | 88 | - name: Prepare cache 2 |
89 | if: matrix.os == 'windows-latest' | 89 | if: matrix.os == 'windows-latest' |
90 | run: Remove-Item ./target/debug/xtask.exe | 90 | run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe |
91 | 91 | ||
92 | typescript: | 92 | typescript: |
93 | name: TypeScript | 93 | name: TypeScript |
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 | } |