-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Enable winget to upgrade itself #505
Comments
Given that winget will be part of the App Installer bundle, pre-installed and updated over the Windows Store AND that winget also plans support for Windows Store applications... is this issue in the current form still relevant? |
@Croydon, there are several different scenarios at play when we take into account enterprise Group Policy, and private sources. Some systems may have the Microsoft Store disabled, and they may be on their own private networks. It would still be possible to pull in a copy of the App Installer and provide it via a private REST source. |
When winget is available as a built in then "winget upgrade winget" should switch me over from the manually installed appxbundle to the officially supported version from windows. |
@lovettchris you should automatically get updates from the Microsoft Store since the releases here are signed. The store would only hand you the "latest" version available for the environment (Windows Insider) or Flight (Partner Center Concept). Once a newer version is published, you would get that update to App Installer. The ability to use the Windows Package Manager to upgrade itself is not necessary to receive the latest stable version from the Microsoft Store. The only requirement is the version in the store must be higher than the version one has installed. |
It is now possible to use the Windows Package Manager to install via the "msstore" source.
edited: I added "--force" as this is required in some scenarios. We still have work with the "msstore" source to report the version in the REST endpoint. We also have work to include monikers in the "msstore" source so the command could be |
@denelon could you explain it a bit for an "end-user": is it correct that:
? What are those cases and is it safe to just try |
The install command today does not perform validation if a package is already installed. We're likely to start checking to see if a package is already installed so a user can get the correct upgrade behavior for packages that require certain switches to be passed to the installer for the upgrade scenario to function correctly (Visual Studio is an example of this). Yes, you are likely to be prompted about which version of App Installer you are attempting to install, and you will be informed if the version you are about to install is "older" than the one present on your system. |
Does this work? because I tried and winget just spins on "Starting package install..." forever. winget v1.3.2691 |
@santagada is a bad user experience, but yes it will work. Depending on the version difference, I've seen it hang in the progress bar, and I've seen it throw an exception. Generally, if I wait a few seconds after that point, I can either [ctrl]+[c] or restart my terminal and run |
winget install winget --accept-source-agreements --accept-package-agreements --force winget -v winget upgrade -all |
Having to kill the application after a while is really bad for automation. Winget is supposed to be used for automation right? I ask because not having it on server versions kinda confuses me a bit. |
There are very few things you can do when you are trying to use the tool....to update the thing you are using. Especially since this is a package and not a traditional app |
I found a better way to resolve this, install scoop first, then use scoop to install/update winget. As winget is just an installer, not a package manager. |
The App Installer was just added to the community repository so you can now run |
But the previous version cannot be removed, because it's a part of windows. |
tried |
Yes.....your point is? There isn't any way around that, it happens no matter how you update winget or any in-box app. Its just how Windows handles it. |
Description of the new feature/enhancement
Winget cannot update it's own package currently, due to the following sequence:
So a whole lot of nothing happens.
Proposed technical implementation details
The most straightforward way is probably to special case this scenario. We could also do some work to run afterward to report the result. For instance (install or update eventually):
Once completed, a new (cmd, unless you can somehow set the default subsystem CONSOLE handler) window comes up to automatically run:
or
The text was updated successfully, but these errors were encountered: