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

Commit dcdb7b3

Browse files
committed
fix: handle installArgs correctly
1 parent 6240ad1 commit dcdb7b3

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/installPackages.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,13 @@ module.exports = async ({
4343
args.push('--registry', registry)
4444
}
4545

46-
installArgs = args.concat(installArgs || [])
47-
logger.debug(npmClient, installArgs.join(' '))
46+
if (installArgs) {
47+
args.push(...installArgs)
48+
}
49+
50+
logger.debug(npmClient, args.join(' '))
4851
spinner.start(`Installing ${packageName} with ${npmClient}`)
49-
const ps = spawn(npmClient, args.concat(installArgs || []), {
52+
const ps = spawn(npmClient, args, {
5053
stdio: [0, 'pipe', 'pipe'],
5154
cwd,
5255
env: Object.assign(

0 commit comments

Comments
 (0)