[PM-16212] Fix: bootstrap version mismatch fails when multiple xcodes are installed (#1279)

This commit is contained in:
Álison Fernandes 2025-01-17 18:48:10 +00:00 committed by GitHub
parent 8992edaf25
commit 2c01812198
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,7 +20,8 @@ if [ ! -f "$xcode_version_file" ]; then
fi
required_version=$(cat "$xcode_version_file")
current_version=$(system_profiler SPDeveloperToolsDataType | grep "Xcode:" | awk '{print $2}')
xcode_line=$(xcodebuild -version 2>/dev/null || system_profiler SPDeveloperToolsDataType | grep "Xcode:")
current_version=$(echo "$xcode_line" | head -n 1 | awk '{print $2}')
if [ -z "$current_version" ]; then
echo "❌ Could not determine current Xcode version. Is Xcode installed?"
exit 1