Skip to content

Commit 95ea47d

Browse files
Bob for Tim's latest apple and bite it off
1 parent 600edc9 commit 95ea47d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/ci/scripts/select-xcode.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
#!/bin/bash
22
# This script selects the Xcode instance to use.
33

4-
set -euo pipefail
4+
set -euox pipefail
55
IFS=$'\n\t'
66

77
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
88

99
if isMacOS; then
10+
old_xcode="$(xcode-select --print-path)"
11+
if [[ $old_xcode =~ $SELECT_XCODE ]]; then
12+
echo "xcode-select.sh's brutal hack may not be necessary?"
13+
exit 1
14+
elif [[ $SELECT_XCODE =~ "16" ]]
15+
else
16+
sudo xcode-select -s "16.0.0"
17+
xcode_16_path="$(xcode-select --print-path)"
18+
sudo rm -rf "${xcode_16_path}/../../"
19+
fi
20+
sudo rm -rf "${old_xcode}/../../"
1021
sudo xcode-select -s "${SELECT_XCODE}"
1122
fi

0 commit comments

Comments
 (0)