From 8eead9668c7001e94ab03fcd4f657442cc59b95d Mon Sep 17 00:00:00 2001 From: Tamilarasan Raja Date: Sun, 28 Jun 2026 00:39:04 +0530 Subject: [PATCH] commands: replace force-unwrap with optional chaining in ImagePrune --- Sources/ContainerCommands/Image/ImagePrune.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ContainerCommands/Image/ImagePrune.swift b/Sources/ContainerCommands/Image/ImagePrune.swift index 420a4eec4..62a2695bd 100644 --- a/Sources/ContainerCommands/Image/ImagePrune.swift +++ b/Sources/ContainerCommands/Image/ImagePrune.swift @@ -88,7 +88,7 @@ extension Application { private func hasTag(_ reference: String) -> Bool { do { let ref = try ContainerizationOCI.Reference.parse(reference) - return ref.tag != nil && !ref.tag!.isEmpty + return ref.tag?.isEmpty == false } catch { return false }