Update access time on `pull` (#925)

To make sure we won't prune then immediately after. Useful for when scenarios similar to Cirrus CLI when we make sure that several images are up-to-date before every request for task execution.
This commit is contained in:
Fedor Korotkov 2024-10-25 12:33:30 -07:00 committed by GitHub
parent b52a857698
commit d49ed46439
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -47,5 +47,8 @@ struct Pull: AsyncParsableCommand {
defaultLogger.appendNewLine("pulling \(remoteName)...")
try await VMStorageOCI().pull(remoteName, registry: registry, concurrency: concurrency, deduplicate: deduplicate)
// to explicitly set the image as being accessed so it won't get pruned immediately
_ = try VMStorageOCI().open(remoteName)
}
}