Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit 9631e2a

Browse files
committed
fix(main): only exec if this is the main module
1 parent d5d5085 commit 9631e2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ const which = promisify(require('which'))
1111

1212
const PATH_SEP = process.platform === 'win32' ? ';' : ':'
1313

14-
main(parseArgs())
14+
if (require.main === module) {
15+
main(parseArgs())
16+
}
1517

1618
module.exports = main
1719
function main (argv) {

0 commit comments

Comments
 (0)