From e2bd7d34e73c90d79ef50ffd9096da15d0ae1336 Mon Sep 17 00:00:00 2001 From: bismansahni Date: Mon, 6 Oct 2025 13:14:37 -0700 Subject: [PATCH] Fix image save to default to current platform when no platform specified When saving images without specifying --platform, --arch, or --os flags, the command now defaults to the current platform instead of failing with a notFound error. Fixes #712 --- Sources/ContainerCommands/Image/ImageSave.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/ContainerCommands/Image/ImageSave.swift b/Sources/ContainerCommands/Image/ImageSave.swift index 3ef7c41e..120fb03e 100644 --- a/Sources/ContainerCommands/Image/ImageSave.swift +++ b/Sources/ContainerCommands/Image/ImageSave.swift @@ -66,6 +66,8 @@ extension Application { p = try Platform(from: "\(os ?? "linux")/\(arch)") } else if let os { p = try Platform(from: "\(os)/\(arch ?? Arch.hostArchitecture().rawValue)") + } else { + p = Platform.current } let progressConfig = try ProgressConfig(