Cannot update from a version like 1.2.10 to 1.2.1, "already on version"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 56
- Forks
- 34
- Avg merge
- 27m
- Merged PRs (30d)
- 2
Description
Describe the bug
When on a version like 1.2.10, cannot update to 1.2.1.
To Reproduce
Steps to reproduce the behavior:
- Have an CLI version like 1.2.10-gitsha installed
- Run the command
update --version 1.2.1 - An error results:
<cli name>: Updating CLI... already on version 1.2.10-gitsha
Expected behavior
Update runs to version 1.2.1
Screenshots
<cli name>: Updating CLI... already on version <current version>
Environment (please complete the following information):
- OS & version: macOS 26.6.1
- Shell/terminal & version zsh 5.9 (arm64-apple-darwin25.0)
Additional context
I think this is due to all the .startsWith(version) happening in the implementation, so maybe this could affect all stringwise prefixes, including prerelease or other channel versions like 1.2.0-alpha to 1.2.0?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the problem with a CLI at 1.2.10-gitsha and update --version 1.2.1. Locate the update-version handling and the .startsWith(version) checks mentioned in the issue, then inspect nearby tests or add coverage for the reported versions and prerelease cases. Done means the command updates to 1.2.1 instead of reporting that it is already current.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100