Skip to content

Commit 1b01f54

Browse files
committed
Throw instead of exiting on bad path arg
1 parent d749a1e commit 1b01f54

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mod.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export async function bundleUserscript (
3333
);
3434

3535
const stats = await statsIfExists(entrypointPath);
36-
if (!(stats.exists && stats.isFile)) exitWithMessage(1, `The entrypoint argument provided is not a file:\n${entrypointPath}`);
36+
if (!(stats.exists && stats.isFile)) {
37+
throw new Error(`The entrypoint argument provided is not a file:\n${entrypointPath}`);
38+
}
3739

3840
let bundleName = '';
3941

0 commit comments

Comments
 (0)