winget-cli
winget-cli copied to clipboard
Allow multiple apps in a single command
This change adds support specifying multiple packages in a single command for install, update and uninstall. For example, winget install app1 app2
.
- Added a new argument type called MultiQuery, which is the same as Query but has a limit for values larger than 1. Thankfully the arg parsing was already implemented :)
- Used this new argument in the install, upgrade and uninstall commands. The first step in these commands is now to check if MultiQuery has more than 1 value, and if it doesn't it is replaced by a single Query argument. This way, the change is not visible to existing code.
- If there is more than one value for the multi-query argument, we proceed to search for each query in a separate sub-query, and then we install them all one at a time. The code for this is refactored from the import flow which does pretty much the same thing.
- Added unit tests for these 3 commands.
I did not extend argument validation in this PR. Ideally we would block arguments that don't make sense for more than one package when doing multi-queries, like --override. I will send a separate PR to refactor the argument validation to make this easier without repeating it in the three commands.
Closes #219
Microsoft Reviewers: Open in CodeFlow
Only thing pending now should be arg validation, which once I merge #2862 will be only tagging the arg with the right categories. Although it will have to be a special case since it depends on whether it has one or multiple values.
When and how ill we get the new release ?
If you are looking for stable releases, this will be included in v1.5 client release tracked by milestone here https://github.com/microsoft/winget-cli/milestone/39 It is planned to be released around May
If you are looking to test it early, you can join the Windows Insider program to get preview builds, or watch our release page here https://github.com/microsoft/winget-cli/releases
Where can i get Windows Insider program to get preview builds ?
https://insider.windows.com/ 😊
I mean - on github there are words Development Releases - "Join the Windows Package Manager Insider program by signing up." and "If you decide to install the latest release from GitHub, and you have successfully joined the insider program, you will receive updates when the next development release has been published in the Microsoft Store." I've joined, and i've got mail a few days ago, but MS store has nothing to give me, i have winget -v v1.4.10173 and no update so far. What is going on ? Where is a new version? For example this one https://github.com/microsoft/winget-cli/releases/tag/v1.5.101-preview
I mean - on github there are words Development Releases - "Join the Windows Package Manager Insider program by signing up." and "If you decide to install the latest release from GitHub, and you have successfully joined the insider program, you will receive updates when the next development release has been published in the Microsoft Store." I've joined, and i've got mail a few days ago, but MS store has nothing to give me, i have winget -v v1.4.10173 and no update so far. What is going on ? Where is a new version? For example this one
v1.5.101-preview
(release)
Preview releases aren't cut after every PR. There is internal validation and testing that has to happen before a release is cut. I would think it would be another week or two before these changes are available in a preview
What we gave at store is 1.19.10173 - how does this relate to github versions ? There is no 1.19 at github!
What we gave at store is 1.19.10173 - how does this relate to github versions ? There is no 1.19 at github!
AppInstaller contains winget, but it is not winget itself; The version marked Latest
in Github Releases is what is bundled with the AppInstaller
from MSStore (unless you're on an insider build)
What we gave at store is 1.19.10173 - how does this relate to github versions ? There is no 1.19 at github!
AppInstaller contains winget, but it is not winget itself; The version marked Latest
in Github Releases is what is bundled with the AppInstaller
from MSStore (unless you're on an insider build)
So no hope to wait new appinstaller at store ?
What we gave at store is 1.19.10173 - how does this relate to github versions ? There is no 1.19 at github!
I know it doesn't seem to make sense, but there is a difference of 15 between the minor version of the App Installer package and the minor version of the winget cli. App Installer v1.19.10173 includes winget v1.4.10173.
This change will come in the preview for winget v1.5, so it will be a App Installer v1.20.
I think it takes some time to start getting preview builds after joining the insider program. Once you see you're on a v1.5 build you'll know you are receiving preview builds, so you should get the one with this change once it's out.
So i should look at store to see if there an update to App Installer v1.20 ? P.S. Maybe it could be useful to write somewhere at package description what version of wiget it includes ?