Currently (on my system of Node v12.18.0 and DuH 1.18.2), if you have a duh validate failure, you get a zero exit code with some information about promise rejections being deprecated:
(node:46744) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:46744) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
If duh validate fails, it should return a non-zero exit code (preferably something sane like 1).
I can't speak to how this should be handled, but adding the --unhandled-rejections=strict option inside duh.js' shebang will cause the exit code to change to 1 for me.
Currently (on my system of Node v12.18.0 and DuH 1.18.2), if you have a
duh validate
failure, you get a zero exit code with some information about promise rejections being deprecated:If
duh validate
fails, it should return a non-zero exit code (preferably something sane like1
).I can't speak to how this should be handled, but adding the
--unhandled-rejections=strict
option insideduh.js
' shebang will cause the exit code to change to1
for me.