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

package::windows fails even when choco is successful #333

Open
holysoles opened this issue May 13, 2024 · 0 comments
Open

package::windows fails even when choco is successful #333

holysoles opened this issue May 13, 2024 · 0 comments

Comments

@holysoles
Copy link

holysoles commented May 13, 2024

Use Case

the package::windows task uses chocolatey to install packages. By default in chocolatey (docs), the package script exit code is passed through. This can be a variety of exit codes.

However, the task code here throws an exception if choco returns non-zero.

Describe the Solution You Would Like

Support non-zero exit codes. Some ideas for how to implement that:

  • check the chocolatey usePackageExitCodes config setting with choco config get <name> (although this seems to error if not set.. needs more investigation)
  • checking stderr
  • checking for -ne -1 or probably a number of other ways

Describe Alternatives You've Considered

catch errors when calling the task.

Additional Context

n/a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant