Skip to content

Commit

Permalink
Update access time on pull (#925)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fkorotkov authored Oct 25, 2024
1 parent b52a857 commit d49ed46
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/tart/Commands/Pull.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit d49ed46

Please sign in to comment.