Before modify script not called when install command is used to upgrade
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
Reference conversation - https://gitter.im/chocolatey/choco?at=57d876cab8d4c138408ed7d9
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).
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
Still up for grabs :D