HNHacker News
TopNewBestAskShowJobs

notrob

12 karma · joined September 26, 2022

submissionscomments
notrob··on GitHub Actions Pitfalls
> The problem is that exec does not return a non-zero return code if the command fails. Instead, it returns a rejected promise.

> While this behavior can be changed by passing ignoreReturnCode as the third argument ExecOptions, the default behavior is very surprising.

This is the same behavior as node's child process exec when wrapped by util.promisify[1] If something returns a promise (async func) it should be expected that it has the possibility of being rejected.

[1] https://nodejs.org/api/child_process.html#child_processexecc...