Skip to content

Commit 6b477d9

Browse files
authored
Check existance of package resolver caches (#5944)
1 parent 624c2bf commit 6b477d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/PackageRegistry/RegistryDownloadsManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public class RegistryDownloadsManager: Cancellable {
252252
}
253253

254254
public func purgeCache() throws {
255-
guard let cachePath = self.cachePath else {
255+
guard let cachePath = self.cachePath, fileSystem.exists(cachePath) else {
256256
return
257257
}
258258
try self.fileSystem.withLock(on: cachePath, type: .exclusive) {

0 commit comments

Comments
 (0)