Skip to content

Commit

Permalink
fix: properly handle rejections on createPackageWithOptions (#254)
Browse files Browse the repository at this point in the history
fix: properly handle rejections on createPackageWithOptions
  • Loading branch information
erikian authored Sep 19, 2023
1 parent ac9dd42 commit f60a4c1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions bin/asar.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ program.command('pack <dir> <output>')
builddir: options.sb,
dot: !options.excludeHidden
}
asar.createPackageWithOptions(dir, output, options, function (error) {
if (error) {
console.error(error.stack)
process.exit(1)
}
asar.createPackageWithOptions(dir, output, options).catch(error => {
console.error(error)
process.exit(1)
})
})

Expand Down

0 comments on commit f60a4c1

Please sign in to comment.