Library icon indicating copy to clipboard operation
Library copied to clipboard

Chocolatey Install Step Template does not allow upgrading packages

Open pauby opened this issue 4 years ago • 2 comments

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?)

pauby avatar Oct 02 '20 10:10 pauby

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.

jochenjonc avatar Feb 19 '21 09:02 jochenjonc

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?

pauby avatar Feb 19 '21 10:02 pauby

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.

harrisonmeister avatar Feb 21 '23 09:02 harrisonmeister