-
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
Add --custom argument for passing additional installer arguments #2832
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Thanks for the pr. The change looks great. But as this will be a supported feature, for feature parity, we'd better add it to Com api around here with related implementation, also this should be added as contract version 6 since winget v1.4 just got finalized. And this is also a good one to update Powershell module around here with related tests. Or alternatively, if you feel not comfortable adding above changes at the moment, we can add it behind an experimental feature, and we'll implement the Com api and PS module during winget v1.5 milestone and remove experimental feature later. |
Thanks for the feedback! I think I got it implemented, but I couldn't find where the tests were for the PowerShell module. Any guidance you can provide on where I should be adding additional tests would be appreciated |
I also decided to add some whitespace handling just in case. I didn't think it made sense to error on whitespace, but if there's some other way you'd like it handled (or if you'd like the whitespace handling reverted) just let me know |
Thank you. The Powershell tests are here. But after a closer look, they are just some basic smoke tests. So it's probably fine with the current unit tests only. |
src/AppInstallerCLICore/Workflows/ShellExecuteInstallerHandler.cpp
Outdated
Show resolved
Hide resolved
src/AppInstallerCLICore/Workflows/ShellExecuteInstallerHandler.cpp
Outdated
Show resolved
Hide resolved
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
a44816b
to
43f7bbb
Compare
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.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
We're running out of letters :) Naming things is hard. --augment What happens if we have both "--override" and this new argument? I had a discussion with the Visual Studio team about this feature a few days ago. It's common for users to want to add switches to their Visual Studio install so they can include workloads. We might also have a situation where the default install from WinGet is "Silent with progress" and the user attempts to add another switch that conflicts with the ones WinGet already has for install mode or scope. I don't know if installers would take the first argument, the last argument, or throw an exception. |
Override takes precedence and only the value for override is used
Most installers would throw exception (from what I've seen). However, the idea of "adding your own switches" to the default switches winget uses is almost certainly a power user feature, or at least one that most users should understand to check their input before blaming the cli |
Microsoft Reviewers: Open in CodeFlow