Skip to content

Commit fb02ed6

Browse files
author
Benjamin E. Coe
authored
fix: we were not exiting with 1 if mkdir failed (#89)
1 parent d0b132e commit fb02ed6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

bin/c8.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
const instrumenterArgs = hideInstrumenteeArgs()
1616
let argv = buildYargs().parse(instrumenterArgs)
1717

18-
;(async function run () {
18+
async function run () {
1919
if ([
2020
'check-coverage', 'report'
2121
].indexOf(argv._[0]) !== -1) {
@@ -33,4 +33,9 @@ let argv = buildYargs().parse(instrumenterArgs)
3333
done()
3434
})
3535
}
36-
})()
36+
}
37+
38+
run().catch((err) => {
39+
console.error(err.stack)
40+
process.exitCode = 1
41+
})

0 commit comments

Comments
 (0)