fix: Add global unhandledRejection handler

releases/v3
Dmitry Gusakov 2022-08-30 18:58:49 +03:00
parent d360fad3a4
commit 0600ca1902
No known key found for this signature in database
GPG Key ID: 9DCF3AB500B86394
1 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,13 @@ async function handleVersioningByExtension(ext, file, versionPath, releaseType)
async function run() { async function run() {
try { try {
process.on('unhandledRejection', (reason, promise) => {
let error = `Unhandled Rejection occurred. Reason: ${reason.stack}`
console.error(error)
core.setFailed(error)
});
let gitCommitMessage = core.getInput('git-message') let gitCommitMessage = core.getInput('git-message')
const gitUserName = core.getInput('git-user-name') const gitUserName = core.getInput('git-user-name')
const gitUserEmail = core.getInput('git-user-email') const gitUserEmail = core.getInput('git-user-email')