Skip to content

Cannot update from a version like 1.2.10 to 1.2.1, "already on version" #1390

Description

@cflee

Describe the bug
When on a version like 1.2.10, cannot update to 1.2.1.

To Reproduce
Steps to reproduce the behavior:

  1. Have an CLI version like 1.2.10-gitsha installed
  2. Run the command update --version 1.2.1
  3. 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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions