Library
Library copied to clipboard
Chocolatey Install Step Template does not allow upgrading packages
Step template
Chocolatey Install Step Template
Step template parameter inputs
In the packages field, entering all
Step template version
Current version.
Expected behavior
The Step template should also upgrade packages that are already installed and allow all
to be used to upgrade all packages to the latest version.
Actual behavior
The template will install the latest package version but cannot be used to upgrade packages or upgrade all
packages.
Possible solution
Either create a new template that allows upgrading or amend the current template to allow it.
(NOTE: This is the template that I last updated so this issue is a record for me to enhance it with this. Please assign this to me?)
Would it be a good idea to change the install parameter to the upgrade parameter in the script, see line 14 on https://library.octopus.com/step-templates/b2385b12-e5b5-440f-bed8-6598c29b2528/actiontemplate-chocolatey-install-package.
My thoughts around that are yes we could. What this would mean if people install a package, say vscode
is that it would install it to the latest version. However if people come to it and think they are going upgrade vscode
and that it would only do that if it exists. In this case if it didn't exist it would also install it. We could use the --ignore-unfound
parameter to get around this but I'm concerned that the functionality for 'install' is what is associated with this template and a new template should be used for 'upgrade'?
Thoughts?
Closing this issue as it's been 2+ years with no discussion. Please feel free to re-open if this is something you'd like to pursue.