-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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:
- Fetch the latest available version (e.g., from the registry or release API)
- Compare it against the currently installed version
- Skip the download/install if versions match, printing a message like
Already up to date (v1.x.x). - 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request