Skip to content

Commit a9f54ea

Browse files
committed
move try catch into async function
1 parent 4f0b7bd commit a9f54ea

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bin/github-lint.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function execFile(command, args) {
1717
})
1818
}
1919

20-
try {
21-
;(async function() {
20+
;(async function() {
21+
try {
2222
let runs = 0
2323
const codes = []
2424
const commands = []
@@ -58,9 +58,9 @@ try {
5858
process.stderr.write(`\nCommand failed: ${nonzero}\n`)
5959
process.exit(nonzero)
6060
}
61-
})()
62-
} catch (error) {
63-
setTimeout(() => {
64-
throw error
65-
})
66-
}
61+
} catch (error) {
62+
setTimeout(() => {
63+
throw error
64+
})
65+
}
66+
})()

0 commit comments

Comments
 (0)