Skip to content

Commit 7275824

Browse files
authored
Invoke xcodebuild via xcrun (bazelbuild#1157)
`/usr/bin/xcodebuild` is a shim. Both ways are equivalent but this reduces the provisioning needed to run this on non-macOS.
1 parent a8c097b commit 7275824

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/environment_plist/environment_plist.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ trap 'rm -rf "${TEMPDIR}"' ERR EXIT
6565

6666
os_build=$(/usr/bin/sw_vers -buildVersion)
6767
compiler=$(/usr/libexec/PlistBuddy -c "Print :DefaultProperties:DEFAULT_COMPILER" "${PLATFORM_PLIST}")
68-
xcodebuild_version_sdk_output=$(/usr/bin/xcodebuild -version -sdk "${PLATFORM}")
69-
xcodebuild_version_output=$(/usr/bin/xcodebuild -version)
68+
xcodebuild_version_sdk_output=$(/usr/bin/xcrun xcodebuild -version -sdk "${PLATFORM}")
69+
xcodebuild_version_output=$(/usr/bin/xcrun xcodebuild -version)
7070
# Parses 'PlatformVersion N.N' into N.N.
7171
platform_version=$(echo "${xcodebuild_version_sdk_output}" | grep PlatformVersion | cut -d ' ' -f2)
7272
# Parses 'ProductBuildVersion NNNN' into NNNN.

0 commit comments

Comments
 (0)