mirror of https://github.com/cirruslabs/tart.git
Merge 33c49e5f81 into 4ce8a115f7
This commit is contained in:
commit
52a99787bb
|
|
@ -72,6 +72,12 @@ struct Prune: AsyncParsableCommand {
|
|||
if let spaceBudget = spaceBudget {
|
||||
try Prune.pruneSpaceBudget(prunableStorages: prunableStorages, spaceBudgetBytes: UInt64(spaceBudget) * 1024 * 1024 * 1024)
|
||||
}
|
||||
|
||||
// Pruning digest-addressed OCI images can leave their tag symlinks broken.
|
||||
// Run garbage collection after deletion so it can remove those links.
|
||||
if entries == "caches" && (olderThan != nil || spaceBudget != nil) {
|
||||
try VMStorageOCI().gc()
|
||||
}
|
||||
}
|
||||
|
||||
static func pruneOlderThan(prunableStorages: [PrunableStorage], olderThanDate: Date) throws {
|
||||
|
|
|
|||
Loading…
Reference in New Issue