Skip to content

Commit

Permalink
Merge pull request #94 from MarmadileManteater/runjs-being-called-ins…
Browse files Browse the repository at this point in the history
…tead-of-npm-run
  • Loading branch information
bcomnes authored Nov 9, 2022
2 parents 5fb0c9f + 0224167 commit da913f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/run-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,10 @@ module.exports = function runTask(task, options) {
}

// Execute.
const npmPath = options.npmPath || process.env.npm_execpath //eslint-disable-line no-process-env
const npmPath = options.npmPath || process.env.NPM_CLI_JS || process.env.npm_execpath //eslint-disable-line no-process-env
const npmPathIsJs = typeof npmPath === "string" && /\.m?js/.test(path.extname(npmPath))
const execPath = (npmPathIsJs ? process.execPath : npmPath || "npm")
const isYarn = path.basename(npmPath || "npm").startsWith("yarn")
const isYarn = process.env.npm_config_user_agent && process.env.npm_config_user_agent.startsWith("yarn") //eslint-disable-line no-process-env
const spawnArgs = ["run"]

if (npmPathIsJs) {
Expand Down

0 comments on commit da913f9

Please sign in to comment.