From 58872248d5c6e67e2d5856a8c7f23d34a0938dae Mon Sep 17 00:00:00 2001 From: Mihaela Mihaljevic Date: Sun, 12 Jul 2026 13:32:17 +0200 Subject: [PATCH] fix(scripts): let check-wasm skip when the SDK is absent check-all.sh defines exit 77 as a non-fatal infrastructure skip and check-linux.sh already uses it for an unreachable runner, but a missing wasm SDK hard-failed with exit 2, blocking every push from a machine without the toolchain. The hosted CI wasm job stays authoritative; a machine with the SDK installed still fails hard on a real build break. --- scripts/check-wasm.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/check-wasm.sh b/scripts/check-wasm.sh index e09b5de..b217766 100755 --- a/scripts/check-wasm.sh +++ b/scripts/check-wasm.sh @@ -14,9 +14,13 @@ swift_command() { } if ! swift_command sdk list | grep -qx "$SDK_ID"; then - echo "wasm: missing Swift SDK '$SDK_ID'" >&2 - echo "wasm: install the SDK or set SWIFT_WASM_SDK_ID" >&2 - exit 2 + # A missing SDK is "infrastructure unavailable", the same class as an + # unreachable Linux runner: exit 77 so check-all.sh records a SKIP and + # the authoritative wasm gate runs on hosted CI. A machine with the SDK + # installed still fails hard on a real build break below. + echo "wasm: SKIP (missing Swift SDK '$SDK_ID' on this machine)." >&2 + echo "wasm: install the SDK or set SWIFT_WASM_SDK_ID to gate locally." >&2 + exit 77 fi swift_command build --swift-sdk "$SDK_ID"