-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exit with non-zero code if install/upgrade version and a newer version is installed #365
Comments
This can be added as a switch that allows it to exit with non-zero. It depends on what default behavior should be. |
If an older version of a package is requested and allow multiple versions is not selected, choco will do nothing but exit with zero. This gives the appearance that choco has installed that version for automated tools when in fact it has done nothing. Instead it should exit non-zero with an error. Allow choco to attempt to install/upgrade to older versions with an additional `--allow-downgrade` switch.
* stable: (GH-365) Exit Non-zero if newer version installed
@steve-hawkins this will be in 0.9.9.9. |
To use this, it will throw an error on install/upgrade if you ask for an older version than you have installed. If you however want this particular behavior, use |
Awesome stuff! I'll give this a go when 0.9.9.9 is available and let you know how I get on with the Puppet module |
Is there a way to use --allow-downgrade with Chocolatey provider in Puppet? |
@laurchris yes - add it to |
Thank you! |
If someone requests a specific version and we already have a newer version installed, choco should exit with a non-zero code as it doesn't actually install the older version.
This is related to chocolatey-archive/puppet-chocolatey#75
The text was updated successfully, but these errors were encountered: