Skip to content

Commit

Permalink
fix: Add global unhandledRejection handler
Browse files Browse the repository at this point in the history
  • Loading branch information
dgusakov committed Aug 30, 2022
1 parent d360fad commit 0600ca1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/index.js
Expand Up @@ -25,6 +25,13 @@ async function handleVersioningByExtension(ext, file, versionPath, releaseType)

async function run() {
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')
const gitUserName = core.getInput('git-user-name')
const gitUserEmail = core.getInput('git-user-email')
Expand Down

0 comments on commit 0600ca1

Please sign in to comment.