We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf91f94 commit bb41ef6Copy full SHA for bb41ef6
lib/run-task.js
@@ -157,7 +157,7 @@ module.exports = function runTask(task, options) {
157
const npmPath = options.npmPath || process.env.npm_execpath //eslint-disable-line no-process-env
158
const npmPathIsJs = typeof npmPath === "string" && /\.m?js/.test(path.extname(npmPath))
159
const execPath = (npmPathIsJs ? process.execPath : npmPath || "npm")
160
- 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
161
const spawnArgs = ["run"]
162
163
if (npmPathIsJs) {
0 commit comments