Skip to content

Commit 71d640e

Browse files
authoredAug 29, 2020
Fix compatibility with vercel/ncc (#159)
1 parent ebe00a1 commit 71d640e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const normalizePackageData = require('normalize-package-data');
1212

1313
// Prevent caching of this module so module.parent is always accurate
1414
delete require.cache[__filename];
15-
const parentDir = path.dirname(module.parent.filename);
15+
const parentDir = path.dirname(module.parent && module.parent.filename ? module.parent.filename : '.');
1616

1717
const isFlagMissing = (flagName, definedFlags, receivedFlags, input) => {
1818
const flag = definedFlags[flagName];
@@ -153,7 +153,7 @@ const meow = (helpText, options) => {
153153

154154
const showVersion = () => {
155155
console.log(typeof options.version === 'string' ? options.version : pkg.version);
156-
process.exit();
156+
process.exit(0);
157157
};
158158

159159
if (argv._.length === 0 && options.argv.length === 1) {

0 commit comments

Comments
 (0)
Please sign in to comment.