snapcore / action-build

A Github action for building Snapcraft projects
MIT License
42 stars 21 forks source link

Add ignoreReturnCode to check command options #59

Closed weiiwang01 closed 1 year ago

weiiwang01 commented 1 year ago

When using @actions/exec, the exec function will throw an error if the command's exit code is non-zero. If a non-zero return code is expected or accepted , the ignoreReturnCode option should be set in the execution options.

https://github.com/actions/toolkit/blob/7b617c260dff86f8d044d5ab0425444b29fa0d18/packages/exec/src/interfaces.ts#L27-L28

  /** optional.  defaults to failing on non zero.  ignore will not fail leaving it up to the caller */
  ignoreReturnCode?: boolean

Fixes #60