choco icon indicating copy to clipboard operation
choco copied to clipboard

Before modify script not called when install command is used to upgrade

Open chrisdrobison opened this issue 9 years ago • 4 comments

What You Are Seeing?

If I have a package already installed and then I call:

choco install package --version <next version>

The before modify script doesn't get run, even though that seems to me like it should be an upgrade scenario. The script does get run if I call:

choco upgrade package --version <next version>

What is Expected?

IMHO, if the upgrade command can install a package that doesn't exist, then the install command should detect an upgrade scenario if you aren't installing side-by-side.

How Did You Get This To Happen? (Steps to Reproduce)

Detailed above

chrisdrobison avatar Sep 14 '16 15:09 chrisdrobison

Reference conversation - https://gitter.im/chocolatey/choco?at=57d876cab8d4c138408ed7d9

ferventcoder avatar Sep 14 '16 15:09 ferventcoder

Typically we see folks using install for install and not for upgrades. I'm not fully aware of what else may be missed when using install with version as a method for upgrades. It's typically not recommended.

One thing I think we may easily be able to do is see that this is installed (with an older version) and call upgrade instead when a newer version is passed against an existing pre-installed package (not side by side).

ferventcoder avatar Sep 14 '16 15:09 ferventcoder

Hi, is this still up for grabs? If so I'll start researching it. My schedule is pretty tight between work, family, etc. so it might take me a while if that's okay

Isopolito avatar Feb 23 '17 12:02 Isopolito

Still up for grabs :D

ferventcoder avatar Feb 23 '17 22:02 ferventcoder