Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
fix(main): only exec if this is the main module
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Jun 23, 2017
1 parent d5d5085 commit 9631e2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const which = promisify(require('which'))

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

main(parseArgs())
if (require.main === module) {
main(parseArgs())
}

module.exports = main
function main (argv) {
Expand Down

0 comments on commit 9631e2a

Please sign in to comment.