Skip to content

Commit f60a4c1

Browse files
authored
fix: properly handle rejections on createPackageWithOptions (#254)
fix: properly handle rejections on createPackageWithOptions
1 parent ac9dd42 commit f60a4c1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

bin/asar.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,9 @@ program.command('pack <dir> <output>')
3535
builddir: options.sb,
3636
dot: !options.excludeHidden
3737
}
38-
asar.createPackageWithOptions(dir, output, options, function (error) {
39-
if (error) {
40-
console.error(error.stack)
41-
process.exit(1)
42-
}
38+
asar.createPackageWithOptions(dir, output, options).catch(error => {
39+
console.error(error)
40+
process.exit(1)
4341
})
4442
})
4543

0 commit comments

Comments
 (0)