Skip to content

Commit

Permalink
Add shell: true to execFile for npm hover (microsoft#224583)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexr00 committed Aug 2, 2024
1 parent 444d7a4 commit 331b772
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions/npm/src/features/packageJSONContribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export class PackageJSONContribution implements IJSONContribution {
// COREPACK_ENABLE_PROJECT_SPEC makes the npm view command succeed
// even if packageManager specified a package manager other than npm.
const env = { ...process.env, COREPACK_ENABLE_AUTO_PIN: '0', COREPACK_ENABLE_PROJECT_SPEC: '0' };
cp.execFile(npmCommandPath, args, { cwd, env }, (error, stdout) => {
cp.execFile(`"${npmCommandPath}"`, args, { cwd, env, shell: true }, (error, stdout) => {
if (!error) {
try {
const content = JSON.parse(stdout);
Expand Down

0 comments on commit 331b772

Please sign in to comment.