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, and 3010. 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 feature usePackageExitCodes or use the --ignore-package-exit-codes switch 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

Most upvoted comments

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_package resource and expose a returns property which is a list of exit codes that we expect to indicate success.