Skip to content

Commit

Permalink
Polish the code that sets env in packageJSONContribution.ts (microsof…
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli authored and andremmsilva committed May 26, 2024
1 parent 24cfcf4 commit 12a07c3
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 @@ -292,7 +292,7 @@ export class PackageJSONContribution implements IJSONContribution {
// COREPACK_ENABLE_AUTO_PIN disables the package.json overwrite, and
// COREPACK_ENABLE_PROJECT_SPEC makes the npm view command succeed
// even if packageManager specified a package manager other than npm.
const env = { COREPACK_ENABLE_AUTO_PIN: "0", COREPACK_ENABLE_PROJECT_SPEC: "0" };
const env = { ...process.env, COREPACK_ENABLE_AUTO_PIN: '0', COREPACK_ENABLE_PROJECT_SPEC: '0' };
cp.execFile(npmCommandPath, args, { cwd, env }, (error, stdout) => {
if (!error) {
try {
Expand Down

0 comments on commit 12a07c3

Please sign in to comment.