Avoid Xcode version broken pipe in iOS debug workflow (#180)

Capture the full Xcode version output before selecting its first line so Xcode 26 cannot abort on a closed pipe.
This commit is contained in:
Jeppe B
2026-07-20 12:37:42 +02:00
committed by GitHub
parent 3323f392e3
commit 6b8f3ff806
+2 -1
View File
@@ -146,7 +146,8 @@ jobs:
shell: bash
run: |
set -euo pipefail
xcode_version="$(xcodebuild -version | head -n 1)"
xcode_version_output="$(xcodebuild -version)"
IFS= read -r xcode_version <<< "$xcode_version_output"
xcode_major="$(awk '{split($2, version, "."); print version[1]}' <<< "$xcode_version")"
if [[ ! "$xcode_major" =~ ^[0-9]+$ ]] || (( xcode_major < 26 )); then
echo "Xcode 26 or newer is required; found $xcode_version" >&2