Skip to content

Update command re-downloads/reinstalls even when already on latest version #142

@gaia

Description

@gaia

Description

The update command always downloads and installs the latest version, even when the currently installed version is already up to date. This causes unnecessary network traffic, download time, and disk I/O on every update invocation.

Expected Behavior

Before downloading, the update command should:

  1. Fetch the latest available version (e.g., from the registry or release API)
  2. Compare it against the currently installed version
  3. Skip the download/install if versions match, printing a message like Already up to date (v1.x.x).
  4. Only proceed with the download and install if a newer version is available

Current Behavior

The update always downloads and reinstalls regardless of whether the installed version is already the latest.

Suggested Implementation

current=$(get_installed_version)
latest=$(get_latest_version)

if [ "$current" == "$latest" ]; then
  echo "Already up to date ($current). Nothing to do."
  exit 0
fi

# proceed with download and install

The exact approach depends on the package manager / installation method used, but the principle is the same: check before downloading.

Benefits

  • Faster no-op updates (no unnecessary network calls or disk writes)
  • Reduced bandwidth usage
  • Clearer feedback to the user about whether an update actually occurred

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions