Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions code/core/src/common/js-package-manager/PNPMProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,14 @@ export class PNPMProxy extends JsPackageManager {
}

public async getRegistryURL() {
// pnpm 10.7.1+ falls back to npm for certain config keys (including registry)
// https://github.com/pnpm/pnpm/pull/9346
// "npm config" commands are not allowed in workspaces per default
// https://github.com/npm/cli/issues/6099#issuecomment-1847584792
const childProcess = await executeCommand({
command: 'pnpm',
args: ['config', 'get', 'registry'],
command: 'npm',
cwd: this.cwd,
args: ['config', 'get', 'registry', '-ws=false', '-iwr'],
});
const url = (typeof childProcess.stdout === 'string' ? childProcess.stdout : '').trim();
return url === 'undefined' ? undefined : url;
Expand Down