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="'/COMPONENTS=icons,assoc,assoc_sh,autoupdate,windowsterminal,scalar'" --package-parameters="'/GitAndUnixToolsOnPath /NoAutoCrlf /WindowsTerminal /NoShellIntegration /NoGuiHereIntegration /NoShellHereIntegration /WindowsTerminalProfile /DefaultBranchName:main /Editor:VisualStudioCode'"" />
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.
It would be nice to have a flag similar to the
--include-version-numbersflag for thechoco exportcommand but for including the installation arguments of a given package (assuming the user has the configurationuseRememberedArgumentsForUpgradesenabled).Consider the following scenario where I install Git with various installation arguments applied:
then run
choco export -o="choco-packages.config", however the output XML only contains:whereas it could contain something like so:
This way, when I run
cinst -y choco-packages.configit would apply the initial install-args and params for Git.Proposed Solution: add
--include-install-argsflag to thechoco exportcommand.