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
4 changes: 3 additions & 1 deletion code/lib/cli/src/js-package-manager/NPMProxy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sort from 'semver/functions/sort';
import { platform } from 'os';
import { JsPackageManager } from './JsPackageManager';
import type { PackageJson } from './PackageJson';
import type { InstallationMetadata, PackageMetadata } from './types';
Expand Down Expand Up @@ -51,7 +52,8 @@ export class NPMProxy extends JsPackageManager {
}

public findInstallations() {
const commandResult = this.executeCommand('npm', ['ls', '--json', '--depth=99']);
const pipeToNull = platform() === 'win32' ? '2>NUL' : '2>/dev/null';
const commandResult = this.executeCommand('npm', ['ls', '--json', '--depth=99', pipeToNull]);

try {
const parsedOutput = JSON.parse(commandResult);
Expand Down
Loading