From 6cdb8bf0a29921f8a5630f72d885dcf9c5a450b6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Sat, 13 Dec 2025 20:27:14 +0100 Subject: [PATCH] Fix xcode-select The old Xcode sticks around, so make sure we sort in reverse to pick the newer version. Technically we should use something like sort -Vr, but -V doesn't exist on macOS. But that won't be a problem until Xcode 100, which my great great grand children can worry about. --- .github/actions/macos-update-clang/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/macos-update-clang/action.yml b/.github/actions/macos-update-clang/action.yml index bceb431aed5..916b4dfe41f 100644 --- a/.github/actions/macos-update-clang/action.yml +++ b/.github/actions/macos-update-clang/action.yml @@ -8,7 +8,7 @@ runs: label=$((softwareupdate -l 2>/dev/null | grep 'Label:' | grep -o 'Command Line Tools for Xcode.*' | head -1) || echo '') if [ -n "$label" ]; then softwareupdate -i "$label" - xcode_path=$(ls -1 '/Applications' | grep 'Xcode_.*\.app' | head -1) + xcode_path=$(ls -1 '/Applications' | grep 'Xcode_.*\.app' | sort -r | head -1) sudo xcode-select -s "/Applications/$xcode_path" else echo "Not found."