Skip to content

Commit 3ebd955

Browse files
committed
also delete new cargo .global_cache when clearing caches
1 parent 8bcdf88 commit 3ebd955

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/workspace.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::inside_docker::CurrentContainer;
44
use crate::Toolchain;
55
use failure::{Error, ResultExt};
66
use log::info;
7+
use std::fs;
78
use std::path::{Path, PathBuf};
89
use std::sync::Arc;
910
use std::time::Duration;
@@ -236,6 +237,11 @@ impl Workspace {
236237
}
237238
}
238239

240+
let global_cache = self.cargo_home().join(".global-cache");
241+
if global_cache.exists() {
242+
fs::remove_file(global_cache)?;
243+
}
244+
239245
Ok(())
240246
}
241247

0 commit comments

Comments
 (0)