Skip to content

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

@holysoles

Description

@holysoles

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions