XcodesOrg / XcodesOrg/xcodes

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

Open
#350 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
4.8k
Forks
182
Avg merge
2d 12h
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running xcodes select when no Xcode version is installed and trace the command's handling of an empty installed-version list. Update the resulting message to say that Xcode is not installed and recommend xcode install; done means the command no longer shows the invalid-number error in this state.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.