From 26640ef87cf3da6d636154c0497aaa3cafa7416a Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Sun, 5 Jul 2026 02:52:49 +0530 Subject: [PATCH] Make Arch.hostArchitecture() fail fast on unsupported architectures. The compile-time #if/#elseif switch in hostArchitecture() covered only arch(arm64) and arch(x86_64) with no #else, so on any other architecture the function had no return statement and produced a confusing missing-return error. Add an #else that emits a clear #error diagnostic, mirroring the explicit unknown-architecture handling in ClientKernel.swift. This is behavior-preserving on the two supported architectures. --- Sources/Services/ContainerAPIService/Client/Arch.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/Services/ContainerAPIService/Client/Arch.swift b/Sources/Services/ContainerAPIService/Client/Arch.swift index bc90dea29..743acf64c 100644 --- a/Sources/Services/ContainerAPIService/Client/Arch.swift +++ b/Sources/Services/ContainerAPIService/Client/Arch.swift @@ -33,6 +33,8 @@ public enum Arch: String { return .arm64 #elseif arch(x86_64) return .amd64 + #else + #error("unsupported host architecture") #endif } }