Skip to content
This repository has been archived by the owner on Feb 5, 2022. It is now read-only.

Commit

Permalink
fix: handle installArgs correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Nov 20, 2018
1 parent 6240ad1 commit dcdb7b3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/installPackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ module.exports = async ({
args.push('--registry', registry)
}

installArgs = args.concat(installArgs || [])
logger.debug(npmClient, installArgs.join(' '))
if (installArgs) {
args.push(...installArgs)
}

logger.debug(npmClient, args.join(' '))
spinner.start(`Installing ${packageName} with ${npmClient}`)
const ps = spawn(npmClient, args.concat(installArgs || []), {
const ps = spawn(npmClient, args, {
stdio: [0, 'pipe', 'pipe'],
cwd,
env: Object.assign(
Expand Down

0 comments on commit dcdb7b3

Please sign in to comment.