[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(cli): cli windows compat (#942)

Co-authored-by: Daniel Roe <daniel@roe.dev>

authored by

rygrit
Daniel Roe
and committed by
GitHub
58da157b ec1f032b

+4 -1
+4 -1
cli/src/npm-client.ts
··· 124 124 125 125 try { 126 126 // Use execFile instead of exec to avoid shell injection vulnerabilities 127 - // execFile does not spawn a shell, so metacharacters are passed literally 127 + // On Windows, shell: true is required to execute .cmd files (like npm.cmd) 128 + // On Unix, we keep it false for better security and performance 128 129 const { stdout, stderr } = await execFileAsync('npm', npmArgs, { 129 130 timeout: 60000, 130 131 env: { ...process.env, FORCE_COLOR: '0' }, 132 + shell: process.platform === 'win32', 131 133 }) 132 134 133 135 if (!options.silent) { ··· 386 388 timeout: 60000, 387 389 cwd: tempDir, 388 390 env: { ...process.env, FORCE_COLOR: '0' }, 391 + shell: process.platform === 'win32', 389 392 }) 390 393 391 394 logSuccess(`Published ${name}@0.0.0`)