Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions system-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -754,12 +754,26 @@ function check_xcode_components ()

for comp in "${COMPONENTS[@]}"; do
componentInfo=$(xcrun xcodebuild -showComponent "$comp")
if [[ "$componentInfo" =~ .*Status:" "installed.* ]]; then
local NEEDS_INSTALL=
local NEEDS_UPDATE=
if [[ "$componentInfo" =~ .*Status:" "installedUpdateAvailable.* ]]; then
NEEDS_UPDATE=1
elif [[ "$componentInfo" =~ .*Status:" "installed.* ]]; then
NEEDS_INSTALL=
else
NEEDS_INSTALL=1
fi

if test -z "$NEEDS_INSTALL$NEEDS_UPDATE"; then
ok "The Xcode component ${COLOR_BLUE}$comp${COLOR_CLEAR} is installed."
elif test -z "$PROVISION_XCODE_COMPONENTS"; then
fail "The Xcode component ${COLOR_BLUE}$comp${COLOR_RESET} is not installed. Execute ${COLOR_MAGENTA}xcrun xcodebuild -downloadComponent $comp${COLOR_RESET} or ${COLOR_MAGENTA}./system-dependencies.sh --provision-xcode-components${COLOR_RESET} to install."
if test -n "$NEEDS_UPDATE"; then
fail "The Xcode component ${COLOR_BLUE}$comp${COLOR_RESET} is installed, but an update is available. Execute ${COLOR_MAGENTA}xcrun xcodebuild -downloadComponent $comp${COLOR_RESET} or ${COLOR_MAGENTA}./system-dependencies.sh --provision-xcode-components${COLOR_RESET} to install."
else
Comment on lines +770 to +772
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The failure message for the installedUpdateAvailable case ends with "...to install." even though the component is already installed; this reads like a contradiction. Consider changing the wording to explicitly say "to update" or "to (re)install/update" so it’s clear the same command is being used to bring the component up to date.

Copilot uses AI. Check for mistakes.
fail "The Xcode component ${COLOR_BLUE}$comp${COLOR_RESET} is not installed. Execute ${COLOR_MAGENTA}xcrun xcodebuild -downloadComponent $comp${COLOR_RESET} or ${COLOR_MAGENTA}./system-dependencies.sh --provision-xcode-components${COLOR_RESET} to install."
fi
fail "Alternatively you can ${COLOR_MAGENTA}export IGNORE_XCODE_COMPONENTS=1${COLOR_RED} to skip this check."
else
elif test -n "$PROVISION_XCODE_COMPONENTS"; then
log "Installing the Xcode component ${COLOR_BLUE}$comp${COLOR_CLEAR} by executing ${COLOR_BLUE}xcrun xcodebuild -downloadComponent $comp${COLOR_CLEAR}..."
xcrun xcodebuild -downloadComponent "$comp"

Expand Down