Skip to content

Commit 14b068a

Browse files
committed
fix: only add --experimental-networking for node/npm/etc binaries
Fixes microsoft/vscode#248553
1 parent b600533 commit 14b068a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/targets/node/nodeBinaryProvider.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ export class NodeBinary {
132132
this.capabilities.add(Capability.UseInspectPublishUid);
133133
}
134134

135-
if (version.gte(new Semver(22, 14, 0)) && version.lt(new Semver(24, 0, 0))) {
135+
if (
136+
version.gte(new Semver(22, 14, 0)) && version.lt(new Semver(24, 0, 0))
137+
&& binariesSupportNodeFlags.includes(getNormalizedBinaryName(path))
138+
) {
136139
this.capabilities.add(Capability.UseExperimentalNetworking);
137140
}
138141
}
@@ -158,6 +161,7 @@ export class NodeBinaryOutOfDateError extends ProtocolError {
158161
}
159162

160163
const nodeOrElectronBinaries = ['node', 'node64', 'electron'];
164+
const binariesSupportNodeFlags = [...nodeOrElectronBinaries, 'npx', 'npm'];
161165

162166
/**
163167
* Mapping of electron versions to *effective* node versions. This is not

0 commit comments

Comments
 (0)