diff --git a/src/main/wsl/wsl-daemon-connector-stream.ts b/src/main/wsl/wsl-daemon-connector-stream.ts index d9369e7ed36..d8ac01873ea 100644 --- a/src/main/wsl/wsl-daemon-connector-stream.ts +++ b/src/main/wsl/wsl-daemon-connector-stream.ts @@ -10,7 +10,9 @@ export function openWslDaemonConnectorStream( ): Promise { signal.throwIfAborted() const child = spawnProcess(spec) - const stream = Duplex.from({ readable: child.stdout, writable: child.stdin }) + const pair = { readable: child.stdout, writable: child.stdin } + // oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: Node supports Node-stream pairs; current typings omit them. Byte/EOF tests cover this path. + const stream = Duplex.from(pair as unknown as Parameters[0]) // A child can fail before the awaiting protocol consumer has installed its listener. stream.on('error', () => {}) stream.once('close', () => child.kill())