XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.6k stars 120 forks source link

When running `xcodes install --select`, if Xcode is already installed, it is not selected #236

Closed daltonclaybrook closed 5 months ago

daltonclaybrook commented 1 year ago

When running xcodes install --select 14.0.1, if Xcode 14.0.1 is already installed on the system, it is not re-installed, but it is still selected correctly. The following message is printed:

Selected /Applications/Xcode-14.0.1.app/Contents/Developer

When running xcodes install --select without specifying a version, the tool reads the .xcode-version file and attempts to install that version. Unlike in the above example, however, if this version is already installed, it is not selected and the following message is printed instead:

14.0.1 is already installed at /Applications/Xcode-14.0.1.app

I believe that these two invocations should behave the same way. Specifically, both should select the appropriate version of Xcode, even if it is already installed.