XcodesOrg / xcodes

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

`xcode installed` command doesn't parse .xcode-version beta format #306

Closed rzulkoski closed 4 months ago

rzulkoski commented 12 months ago

When using the Xcode 15 beta you can update your .xcode-version file to reference version "15" or "15.0" and as long as you only have 1 beta installed it will resolve the correct path. However, if you have more that one beta installed it will return an error due to it finding multiple matches, which is the desired behavior. In order to disambiguate which version you are trying to reference you can specify a version like "15.0b3". The issue is that the xcode installed command doesn't recognize this format.

This causes downstream issues when using tools like Fastlane for builds as it is able to properly determine the desired version, but then causes an error when querying xcodes.

Desired behavior: xcodes installed "15.0b2" /Applications/Xcode-15.0.0-Beta.2.app

Actual behavior: xcodes installed "15.0b2" 15.0 B 2 is not installed.

rzulkoski commented 12 months ago

I have just discovered that specifying the version as "15.0beta3" does appear to work. Would it still be valuable to include this change to parse the shorthand version as well? Or maybe the .xcode-version README should spell it out as well.