-
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
Allow multiple apps in a single command #2861
Conversation
if (!foundAll) | ||
{ | ||
AICLI_LOG(CLI, Info, << "Could not find one or more packages"); | ||
if (context.Args.Contains(Execution::Args::Type::IgnoreUnavailable)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this arg need to be added to install / upgrade in case one of the multiqueries returns no packages? What happens if the user runs winget install 7zip chrome ThisExampleIsNotPresent
? Would all packages fail, or would 7zip and chrome still be installed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not need to be added, but we could add it. As it is, it would fail with a message that not all packages were found before installing anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Failing is desirable so as to avoid confusion about what installed vs failed!
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. |
{ | ||
context << | ||
Workflow::GetMultiSearchRequests << | ||
Workflow::SearchSubContextsForSingle(Workflow::SearchSubContextsForSingle::SearchPurpose::Uninstall) << |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading through this again, it seems like the implementation in #2877 of SearchResultType and the SearchPurpose here are similar; Would it make sense to align them both to SearchPurpose
and use it more globally rather than inside the namespace of SearchSubContextsForSingle?
If so, I'll update that PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Conflicts: # src/AppInstallerCLICore/Argument.cpp # src/AppInstallerCLICore/Commands/InstallCommand.cpp # src/AppInstallerCLICore/Commands/UninstallCommand.cpp # src/AppInstallerCLICore/Commands/UpgradeCommand.cpp # src/AppInstallerCLICore/ExecutionArgs.h # src/AppInstallerCLICore/Resources.h # src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw
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 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 ? |
I mean - on github there are words Development Releases - "Join the Windows Package Manager Insider program by signing up." |
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! |
AppInstaller contains winget, but it is not winget itself; The version marked |
1 similar comment
AppInstaller contains winget, but it is not winget itself; The version marked |
So no hope to wait new appinstaller at store ? |
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 ? |
This change adds support specifying multiple packages in a single command for install, update and uninstall. For example,
winget install app1 app2
.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