From 23d6ba9aa38e4b590a04a242d5cb208d4b13709f Mon Sep 17 00:00:00 2001 From: cha0s Date: Wed, 9 Mar 2022 08:22:52 -0600 Subject: [PATCH] fix: return code --- packages/core/src/cli.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/src/cli.js b/packages/core/src/cli.js index 1f598df..9baa93e 100755 --- a/packages/core/src/cli.js +++ b/packages/core/src/cli.js @@ -60,8 +60,9 @@ else { const forwardProcessCode = (fn) => async (...args) => { const child = await fn(...args); if ('object' !== typeof child) { - debug('action returned code %d', child); - process.exitCode = child; + const code = 'undefined' !== typeof child ? child : 0; + debug('action returned code %d', code); + process.exitCode = code; return; } try {