From d49ed46439d37f77d9a04090cb58d16bcc378f79 Mon Sep 17 00:00:00 2001 From: Fedor Korotkov Date: Fri, 25 Oct 2024 12:33:30 -0700 Subject: [PATCH] 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. --- Sources/tart/Commands/Pull.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/tart/Commands/Pull.swift b/Sources/tart/Commands/Pull.swift index 02c5e29..d14bc9b 100644 --- a/Sources/tart/Commands/Pull.swift +++ b/Sources/tart/Commands/Pull.swift @@ -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) } }