-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
winget install
should optionally upgrade only if a newer version is available
#1411
Comments
winget install
should optionally upgrade only if a newer version is available
I agree on it with @matbechIf the package is already installed and an upgrade is available, the upgrade should be done. If no upgrade is available, the package should not be reinstalled (which is currently the case with WPM would be much welcome or adds much value to Windows Ecosystem as a Package Manager after implementation of these things @denelon |
We have a couple of related bugs being actively worked on to improve this scenario. |
Thanks for the update! |
It would be great if this issue also get addressed in milestone v1.2-Client |
This may be a duplicate. See |
Duplicate of #929 |
@matbech we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority. |
Description of the new feature/enhancement
As a user I want to ensure that the latest version of package X is installed, whether this package is already installed (and optionally needs to be upgraded) or not. If the package is already installed and an upgrade is available, the upgrade should be done. If no upgrade is available, the package should not be reinstalled (which is currently the case with winget install). If the package is not installed, it should be installed.
To achieve this goal with the current implementation, I have to first run:
winget upgrade X
if the command fails with
"No installed package found matching input criteria."
ERRORLEVEL = -1978335212
Then I install the package with:
winget install X
If I call
winget install X
, the package will be reinstalled, even if the latest version of the package is already installed.Proposed technical implementation details (optional)
I propose an additional command line switch
--upgrade
for thewinget install
command. If the switch is enabled, then the install command should only install (upgrade) the package if a newer version is available.The text was updated successfully, but these errors were encountered: