Skip to content

Add option to include install-args in the choco export command  #2503

@jimbrig

Description

@jimbrig

It would be nice to have a flag similar to the --include-version-numbers flag for the choco export command but for including the installation arguments of a given package (assuming the user has the configuration useRememberedArgumentsForUpgrades enabled).

Consider the following scenario where I install Git with various installation arguments applied:

cinst -y git.install --installargs "'/COMPONENTS=icons,assoc,assoc_sh,autoupdate,windowsterminal,scalar'" --params "/GitAndUnixToolsOnPath /NoAutoCrlf /WindowsTerminal /NoShellIntegration /NoGuiHereIntegration /NoShellHereIntegration /WindowsTerminalProfile /DefaultBranchName:main /Editor:VisualStudioCode"

then run choco export -o="choco-packages.config", however the output XML only contains:

<package id="git.install"/>

whereas it could contain something like so:

<package id="git.install" arguments=" --install-arguments=&quot;&apos;/COMPONENTS=icons,assoc,assoc_sh,autoupdate,windowsterminal,scalar&apos;&quot; --package-parameters=&quot;&apos;/GitAndUnixToolsOnPath /NoAutoCrlf /WindowsTerminal /NoShellIntegration /NoGuiHereIntegration /NoShellHereIntegration /WindowsTerminalProfile /DefaultBranchName:main /Editor:VisualStudioCode&apos;&quot;" />

This way, when I run cinst -y choco-packages.config it would apply the initial install-args and params for Git.

Proposed Solution: add --include-install-args flag to the choco export command.

Metadata

Metadata

Assignees

Labels

3 - ReviewImprovementIssues that enhances existing functionality, or adds new features

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions