Skip to content

Commit dabe5bb

Browse files
committed
fix(extension): quote cmd on windows
Closes #4987 nodejs/node#7367
1 parent 77ae2d4 commit dabe5bb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension/installer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@ export class Installer extends EventEmitter implements IInstaller {
236236
return new Promise<void>((resolve, reject) => {
237237
let args = this.getInstallArguments(this.npm, this.url)
238238
this.log(`Installing dependencies by: ${this.npm} ${args.join(' ')}.`)
239-
const child = child_process.spawn(this.npm, args, {
239+
const cmd = process.platform === 'win32' ? `"${this.npm}"` : this.npm
240+
const child = child_process.spawn(cmd, args, {
240241
cwd: folder,
241242
shell: process.platform === 'win32',
242243
env: Object.assign(process.env, { NODE_ENV: 'production' })

0 commit comments

Comments
 (0)