Skip to content

Commit b44d3e8

Browse files
committed
Add shell: true to execFile for npm hover
Fixes #224510
1 parent b1c0a14 commit b44d3e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extensions/npm/src/features/packageJSONContribution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export class PackageJSONContribution implements IJSONContribution {
293293
// COREPACK_ENABLE_PROJECT_SPEC makes the npm view command succeed
294294
// even if packageManager specified a package manager other than npm.
295295
const env = { ...process.env, COREPACK_ENABLE_AUTO_PIN: '0', COREPACK_ENABLE_PROJECT_SPEC: '0' };
296-
cp.execFile(npmCommandPath, args, { cwd, env }, (error, stdout) => {
296+
cp.execFile(`"${npmCommandPath}"`, args, { cwd, env, shell: true }, (error, stdout) => {
297297
if (!error) {
298298
try {
299299
const content = JSON.parse(stdout);

0 commit comments

Comments
 (0)