File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ DEFAULT_TEAM_ID="AKK7J2GV64"
1212if [ -f " $TEAM_ID_FILE " ]; then
1313 rm " $TEAM_ID_FILE "
1414fi
15+ mkdir -p " $( dirname " $TEAM_ID_FILE " ) "
1516echo " // This file was automatically generated, do not edit directly." > " $TEAM_ID_FILE "
1617echo " " >> " $TEAM_ID_FILE "
1718echo " DEVELOPMENT_TEAM=$DEFAULT_TEAM_ID " >> " $TEAM_ID_FILE "
@@ -27,7 +28,6 @@ TEAM_INFO_RESULT=""
2728
2829function get_team_info_array() {
2930 local XCODEPREFS=" $HOME /Library/Preferences/com.apple.dt.Xcode.plist"
30- local team_info
3131
3232 # Get all team infos and format as key-value pairs
3333 local all_keys=($( /usr/libexec/PlistBuddy -c " Print :IDEProvisioningTeamByIdentifier" " $XCODEPREFS " | grep ' = Array' | awk ' {print $1}' ) )
@@ -46,7 +46,12 @@ function get_team_info_array() {
4646
4747 # Fallback to old method: IDEProvisioningTeams
4848 local found=false
49- TEAM_KEYS=(` /usr/libexec/PlistBuddy -c " Print :IDEProvisioningTeams" " $XCODEPREFS " | perl -lne ' print $1 if /^ (\S*) =/' ` )
49+ # Check if IDEProvisioningTeams exists before trying to read it
50+ if /usr/libexec/PlistBuddy -c " Print :IDEProvisioningTeams" " $XCODEPREFS " > /dev/null 2>&1 ; then
51+ TEAM_KEYS=(` /usr/libexec/PlistBuddy -c " Print :IDEProvisioningTeams" " $XCODEPREFS " | perl -lne ' print $1 if /^ (\S*) =/' ` )
52+ else
53+ TEAM_KEYS=()
54+ fi
5055 for KEY in ${TEAM_KEYS[@]} ; do
5156 i=0
5257 while true ; do
You can’t perform that action at this time.
0 commit comments