diff --git a/action/dist/index.js b/action/dist/index.js index d60c9e7e..10e3b6eb 100644 --- a/action/dist/index.js +++ b/action/dist/index.js @@ -737,7 +737,8 @@ var external_url_default = /*#__PURE__*/__webpack_require__.n(external_url_); console.debug(`plugin ${name} ${result ? result.error ? "failed" : "success" : "ignored"} : ${JSON.stringify(result).replace(/^(.{888}).+/, "$1...")}`) if (die) { const errors = promised.filter(({result = null}) => !!result?.error).length - throw new Error(`${errors} error${s(errors)} found...`) + if (errors) + throw new Error(`${errors} error${s(errors)} found...`) } //Template rendering diff --git a/src/metrics.mjs b/src/metrics.mjs index ad66a3d0..09ff9486 100644 --- a/src/metrics.mjs +++ b/src/metrics.mjs @@ -52,7 +52,8 @@ console.debug(`plugin ${name} ${result ? result.error ? "failed" : "success" : "ignored"} : ${JSON.stringify(result).replace(/^(.{888}).+/, "$1...")}`) if (die) { const errors = promised.filter(({result = null}) => !!result?.error).length - throw new Error(`${errors} error${s(errors)} found...`) + if (errors) + throw new Error(`${errors} error${s(errors)} found...`) } //Template rendering