Skip to content

Commit

Permalink
Merge pull request #151 from bcomnes/fix-pnpm-agian
Browse files Browse the repository at this point in the history
  • Loading branch information
bcomnes committed Sep 13, 2024
2 parents bac3905 + dc2d7da commit c43fa2b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/run-task.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,15 @@ module.exports = function runTask (task, options) {
}

const isYarn = process.env.npm_config_user_agent && process.env.npm_config_user_agent.startsWith('yarn')
const isPnpm = Boolean(process.env.PNPM_SCRIPT_SRC_DIR)
const isNpm = !isYarn && !isPnpm

const spawnArgs = ['run']

if (npmPathIsJs) {
spawnArgs.unshift(npmPath)
}
if (!isYarn) {
if (isNpm) {
Array.prototype.push.apply(spawnArgs, options.prefixOptions)
} else if (options.prefixOptions.indexOf('--silent') !== -1) {
spawnArgs.push('--silent')
Expand Down

0 comments on commit c43fa2b

Please # to comment.