Skip to content

Fix inverted update nagger version comparison #3290

@szokeasaurusrex

Description

@szokeasaurusrex

LastUpdateCheck::is_outdated() appears to compare the fetched release version and current CLI version in the wrong direction. In src/utils/update.rs, the current condition checks whether the fetched release version is older than the running CLI version. For a normal outdated install, such as current version 3.3.0 with fetched latest release 3.4.1, the condition evaluates to 3.4.1 < 3.3.0, so the update-available message is not shown.

The comparison should check whether the running CLI version is older than the fetched release version, for example Version::parse(VERSION).unwrap() < Version::parse(release_v.as_str()).unwrap(). With that direction, the update nagger will show sentry-cli update to <version> is available! when an update is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue typeCLIProduct area
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions