Skip to content

Defaults to Xcode 8 when version check fails#15

Open
Dzamir wants to merge 1 commit intomacstadium:masterfrom
Dzamir:master
Open

Defaults to Xcode 8 when version check fails#15
Dzamir wants to merge 1 commit intomacstadium:masterfrom
Dzamir:master

Conversation

@Dzamir
Copy link

@Dzamir Dzamir commented Dec 10, 2021

The script xcodebuild -version | head -n1 | cut -d " " -f 2 can fail with an error if Xcode is misconfigured, e.g.:
xcrun: error: invalid active developer path (/Applications/Xcode.app/Contents/Developer), missing xcrun at: /Applications/Xcode.app/Contents/Developer/usr/bin/xcrun

If the error is returned, this patch assumes that xcodebuil -version returned 8.0 and it will always install the new version.

When Xcode is misconfigured, xcodebuild -version command returns an error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant