Make ThinkingOrbsDemo/run.sh work on macOS - #13
Open
andresain123 wants to merge 1 commit into
Open
Conversation
The destination id came from awk's match($0, re, arr) — the three-argument
form, which is a GNU extension. macOS ships BSD awk, so on the machine this
script is written for it fails outright:
awk: syntax error at source line 2
xcodebuild then received an empty destination id. Replaced with a small
device_udid helper built on grep -Eo, which resolves both "booted" and a
device name. Verified end to end: generate, build, install and launch all
succeed against a booted iPhone 17 Pro.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run.shresolves the destination id withmatch($0, re, arr)— awk'sthree-argument form, which is a GNU extension. macOS ships BSD awk, so on the
machine this script is written for it fails outright:
set -euo pipefaildoes not catch it — the awk runs inside a commandsubstitution whose failure is not the pipeline's exit status — so
xcodebuildjust receives an empty destination id.
Replaced with a small
device_udidhelper built ongrep -Eo, which resolvesboth
bootedand a device name. Verified end to end on a booted iPhone 17Pro: generate, build, install and launch all succeed.