diff --git a/index.js b/index.js index 71cfe04..c4b4336 100755 --- a/index.js +++ b/index.js @@ -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) {