Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#1443) Reset config after handling package results
This updates the action used when handling package results during upgrade to reset the configuration class that is initially set. This fixes a bug when useRememberedArguments is enabled that causes arguments to be reused in the chocolateyInstall.ps1 when multiple packages are upgraded. It happens because OptionSet.parse() sets the configuration via the actions specified in the UpgradeCommand optionSet setup (and likewise in configuration builder as well). It only sets options that are saved, so if a later package does not have an option, it is not set, and the previous option is reused. This fixes the bug because it resets the configuration at the ChocolateyPackageService level, which is enough to reset the configuration for action that runs the PowerShell as well. Co-authored-by: TheCakeIsNaOH <[email protected]>
- Loading branch information