Skip to content

Commit

Permalink
move try catch into async function
Browse files Browse the repository at this point in the history
  • Loading branch information
koddsson committed Mar 19, 2020
1 parent 4f0b7bd commit a9f54ea
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bin/github-lint.js
Expand Up @@ -17,8 +17,8 @@ function execFile(command, args) {
})
}

try {
;(async function() {
;(async function() {
try {
let runs = 0
const codes = []
const commands = []
Expand Down Expand Up @@ -58,9 +58,9 @@ try {
process.stderr.write(`\nCommand failed: ${nonzero}\n`)
process.exit(nonzero)
}
})()
} catch (error) {
setTimeout(() => {
throw error
})
}
} catch (error) {
setTimeout(() => {
throw error
})
}
})()

0 comments on commit a9f54ea

Please sign in to comment.