From 55bd25f6ca1c321a2f6843934f93522f52a28468 Mon Sep 17 00:00:00 2001 From: Ronit Sabhaya Date: Mon, 12 Jan 2026 13:51:22 -0600 Subject: [PATCH] Add support for aarch64 architecture alias --- Sources/Services/ContainerAPIService/Client/Arch.swift | 2 +- Tests/ContainerAPIClientTests/ArchTests.swift | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Sources/Services/ContainerAPIService/Client/Arch.swift b/Sources/Services/ContainerAPIService/Client/Arch.swift index 70e4f748..bc90dea2 100644 --- a/Sources/Services/ContainerAPIService/Client/Arch.swift +++ b/Sources/Services/ContainerAPIService/Client/Arch.swift @@ -19,7 +19,7 @@ public enum Arch: String { public init?(rawValue: String) { switch rawValue.lowercased() { - case "arm64": + case "arm64", "aarch64": self = .arm64 case "amd64", "x86_64", "x86-64": self = .amd64 diff --git a/Tests/ContainerAPIClientTests/ArchTests.swift b/Tests/ContainerAPIClientTests/ArchTests.swift index 108a038e..f4236b43 100644 --- a/Tests/ContainerAPIClientTests/ArchTests.swift +++ b/Tests/ContainerAPIClientTests/ArchTests.swift @@ -44,10 +44,17 @@ struct ArchTests { #expect(arch == .arm64) } + @Test func testAarch64Alias() throws { + let arch = Arch(rawValue: "aarch64") + #expect(arch != nil) + #expect(arch == .arm64) + } + @Test func testCaseInsensitive() throws { #expect(Arch(rawValue: "AMD64") == .amd64) #expect(Arch(rawValue: "X86_64") == .amd64) #expect(Arch(rawValue: "ARM64") == .arm64) + #expect(Arch(rawValue: "AARCH64") == .arm64) #expect(Arch(rawValue: "Amd64") == .amd64) }