Fix die handle
This commit is contained in:
3
action/dist/index.js
vendored
3
action/dist/index.js
vendored
@@ -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...")}`)
|
console.debug(`plugin ${name} ${result ? result.error ? "failed" : "success" : "ignored"} : ${JSON.stringify(result).replace(/^(.{888}).+/, "$1...")}`)
|
||||||
if (die) {
|
if (die) {
|
||||||
const errors = promised.filter(({result = null}) => !!result?.error).length
|
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
|
//Template rendering
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
console.debug(`plugin ${name} ${result ? result.error ? "failed" : "success" : "ignored"} : ${JSON.stringify(result).replace(/^(.{888}).+/, "$1...")}`)
|
console.debug(`plugin ${name} ${result ? result.error ? "failed" : "success" : "ignored"} : ${JSON.stringify(result).replace(/^(.{888}).+/, "$1...")}`)
|
||||||
if (die) {
|
if (die) {
|
||||||
const errors = promised.filter(({result = null}) => !!result?.error).length
|
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
|
//Template rendering
|
||||||
|
|||||||
Reference in New Issue
Block a user