Skip to content

Commit

Permalink
Add missing bail handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperisager committed May 8, 2024
1 parent 4255100 commit ac703e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/bare.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const Module = require('bare-module')
const os = require('bare-os')
const url = require('bare-url')
const { command, flag, arg, rest } = require('paparam')
const { command, flag, arg, rest, bail } = require('paparam')

const parentURL = url.pathToFileURL(os.cwd())

Expand All @@ -17,6 +17,7 @@ const bare = command(
flag('--print|-p <script>', ''),
arg('<filename>', ''),
rest('[...args]'),
bail((reason) => queueMicrotask(() => { throw reason.err })),
() => {
const { args, flags, rest } = bare

Expand Down

0 comments on commit ac703e9

Please sign in to comment.