Skip to content
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

Support removal of arguments as well as overridden arguments #363

Open
MarcusP-P opened this issue May 29, 2020 · 2 comments
Open

Support removal of arguments as well as overridden arguments #363

MarcusP-P opened this issue May 29, 2020 · 2 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@MarcusP-P
Copy link
Contributor

Description of the new feature/enhancement

This is the counterpart to #239

Some manifests, for example Microsoft.VisualStudo, contain command line options that I would like to remove, for example I have no use for Python, but the manifest specifies "--add Microsoft.VisualStudio.Workload.Python"

I would like to install Visual Studio without this option; however, if I use --override it clears all options specified in the manifest and replaces them. So the only way for me to exclude the options is to copy the whole custom line from the manifest, without the options that I don't want to use.

Proposed technical implementation details (optional)

A new switch that removes the listed arguments from the installer command-line rather than replaces them. This would supplement the --override option rather than replacing it.

Something along the lines of the following would then allow me to retain the manifest-specified default options, whilst still removing what I don't want:

winget install --remove-args "--add Microsoft.VisualStudio.Workload.Python" Microsoft.VisualStudio.Enterprise

I would be able to specify multiple --remove-args multiple times to remove several arguments, e.g.:

winget install --remove-args "--add Microsoft.VisualStudio.Workload.Python" --remove-args "--add Microsoft.VisualStudio.Workload.NativeDesktop" Microsoft.VisualStudio.Enterprise

They key benefit here is that if the authors of the manifest add new default options, I don't have to manually modify my install command to match.

@MarcusP-P MarcusP-P added the Issue-Feature This is a feature request for the Windows Package Manager client. label May 29, 2020
@ghost ghost added the Needs-Triage Issue need to be triaged label May 29, 2020
@yao-msft yao-msft removed the Needs-Triage Issue need to be triaged label Jun 2, 2020
@yao-msft yao-msft added this to the Package Manager Backlog milestone Jun 2, 2020
@zooba
Copy link
Member

zooba commented Jul 8, 2020

You can probably just add the --remove Microsoft.VisualStudio... option. Maybe VS will be upset about adding and removing the same component, but I seem to recall it supported that approach.

@MarcusP-P
Copy link
Contributor Author

@zooba, But at the moment, we can't just add options either - we can only overwrite them.

When I first created this, the VS Enterprise manifest included a few workflows. Now it includes all.

I would much rather remove the --allWorkloads --includeRecommended options and specify my workflows, than removing workflows which becomes more fragile if new workflows are added.

@denelon denelon removed this from the Backlog-Client milestone Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

4 participants