XcodesOrg / xcodes

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

Error "Not a valid number. Expecting a whole number between 1-0" shows when running `xcodes select` when no Xcode is installed #350

Open ngimelliUW opened 4 months ago

ngimelliUW commented 4 months ago

Summary If you try to run xcodes select when no version of Xcode is installed, you get the error:

Not a valid number. Expecting a whole number between 1-0, but given...

This can possibly happen if an installation of a new Xcode version partially completes (uninstalling previous versions), but does not finish installing the new version. A user under the false impression that a new Xcode version is installed might then run this command, and the error message does not make sense.

Screenshots Screenshot 2024-03-04 at 3 49 53 PM

Proposed Solution If no Xcode version is installed, it should say Xcode is not installed. Please run 'xcode install' to install a version.