chef: chocolatey_package resource now reports non-zero as failure in successful scenarios
Description
I mentioned this before in April to @mwrock - https://github.com/chocolatey/choco/issues/512. 0.9.10 just released today and folks are going to start reporting breakages even though we noted it in our release notes and tried to give plenty of notice to folks that it was coming (2 months notice in this case).
Here is the relevant portion of the ChangeLog (under breaking changes):
- Exit with the same exit code as the software being installed - see #512
There are more exit codes from Chocolatey now that indicate success -
0,1605,1614,1641, and3010. You may need to adjust anything you were using that would only check for 0 and nonzero. If you need the previous behavior, be sure to disable the featureusePackageExitCodesor use the--ignore-package-exit-codesswitch in your choco commands.
Platform Version
Windows
Replication Case
Install a package with Chocolatey 0.9.10 that would exit with 3010 indicating reboot, which is now considered a successful exit code by Chocolatey.
Client Output
The resource thinks there is an error.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Workaround for Visual Studio 2015 requesting a restart. packer returns this transcript: ... virtualbox-iso: Packages requiring reboot: virtualbox-iso: - visualstudio2015community (exit code 3... — committed to ColinNg/packer-windows by deleted user 7 years ago
- Workaround for Visual Studio 2015 requesting a restart. packer returns this transcript: ... virtualbox-iso: Packages requiring reboot: virtualbox-iso: - visualstudio2015community (exit code 3... — committed to ColinNg/packer-windows by deleted user 7 years ago
- Workaround for Visual Studio 2015 requesting a restart. packer returns this transcript: ... virtualbox-iso: Packages requiring reboot: virtualbox-iso: - visualstudio2015community (exit code 3... — committed to ColinNg/packer-windows by deleted user 7 years ago
Works with my scripts and my posted workaround 🚢
TY!
awesome @ferventcoder. I think we will do the exact same thing that we do for the
windows_packageresource and expose areturnsproperty which is a list of exit codes that we expect to indicate success.