Skip to content
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

0.9.10 and exit codes #317

Closed
ferventcoder opened this issue Jun 17, 2016 · 6 comments
Closed

0.9.10 and exit codes #317

ferventcoder opened this issue Jun 17, 2016 · 6 comments
Labels
BuildAutomation Issues for changes to the build system, without functional changes needed to the project
Milestone

Comments

@ferventcoder
Copy link
Member

I mentioned this before in April - chocolatey/choco#512. 0.9.10 just released today. This includes the library. As you upgrade, be especially sure to pay attention to this scenario.

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.

@ferventcoder
Copy link
Member Author

cc @gep13 @RichiCoder1 (let me know if I got the tags right).

@RichiCoder1
Copy link
Contributor

RichiCoder1 commented Dec 8, 2016

@ferventcoder We're now checking exit codes to show error messages, so this is very relevant now. Is there a comprehensive lists of "good" codes? If I set --ignore-package-exit-codes can I just keep on using zero and non-zero?

@RichiCoder1
Copy link
Contributor

Or I could tweak lib and add a super secret switch to just have Choco throw exceptions instead of just logging and error and exit code on failure.

@ferventcoder
Copy link
Member Author

You could just use zero or one yes.

@ferventcoder
Copy link
Member Author

The default good exit codes should be listed at the original link.

@RichiCoder1 RichiCoder1 added this to the 0.15.0 milestone Dec 18, 2016
@RichiCoder1
Copy link
Contributor

RichiCoder1 commented Oct 4, 2017

Looks like this was completed a while back. We set config.Features.UsePackageExitCodes = false; and check Environment.ExitCode != 0 for failure. Can reevaluate in the future. Sadly I screwed up our history with the subprocess changes, so I can't find the commit.

@gep13 gep13 added BuildAutomation Issues for changes to the build system, without functional changes needed to the project and removed :Infastructure labels Oct 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BuildAutomation Issues for changes to the build system, without functional changes needed to the project
Projects
None yet
Development

No branches or pull requests

3 participants