diff --git a/lib/run-task.js b/lib/run-task.js index 512ea18..bd87fcf 100644 --- a/lib/run-task.js +++ b/lib/run-task.js @@ -172,7 +172,7 @@ module.exports = function runTask (task, options) { newBasename = basename.replace('pnpx', 'pnpm') // eslint-disable-line no-process-env } - npmPath = newBasename === basename + npmPath = newBasename !== basename ? path.join(path.dirname(process.env.npm_execpath), newBasename) : process.env.npm_execpath // eslint-disable-line no-process-env }