Some checks failed
CI / Detect Changes (pull_request) Successful in 3s
CI / Admin Web CI (pull_request) Has been skipped
CI / YouTube Worker (pull_request) Has been skipped
PR → Build → WiFi/USB Deploy → LGTM / Build & Deploy to iPhone (WiFi/USB) (pull_request) Failing after 4m12s
PR → Build → WiFi/USB Deploy → LGTM / Wait for LGTM comment (pull_request) Has been skipped
CI / Deploy (pull_request) Has been skipped
Bash -e doesn't just kill on pipefail — it exits on ANY non-zero command. Even without a pipeline, both xcrun devicectl and ios-deploy return non-zero on failure, killing the script before the exit-code check. Fix: wrap both in 'if command; then exit 0; fi' so -e treats them as condition-tested (no early exit). Fallback now actually runs.