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

Commit

Permalink
fix(npx): npx npx npx npx npx npx npx npx npx works again
Browse files Browse the repository at this point in the history
  • Loading branch information
zkat committed Jul 11, 2017
1 parent b5732ef commit 875d4cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ module.exports._execCommand = execCommand
function execCommand (_existing, argv) {
return findNodeScript(_existing, argv).then(existing => {
const Module = require('module')
if (existing && Module.runMain && !argv.shell && existing !== __filename) {
if (existing && Module.runMain && !argv.shell && existing !== process.argv[1]) {
// let it take over the process. This means we can skip node startup!
if (!argv.noYargs) {
// blow away built-up yargs crud
Expand Down

0 comments on commit 875d4cd

Please sign in to comment.