Use detached: true on Windows

Unfortunately, the fix in #55 was not sufficient - the behavior of spawn
depends on the "console'ness" of the originally launched process, which has the
effect of development behavior for Claude Desktop on Windows being
different than in production, since the launching process is Claude.exe
(a Win32 Subsystem app) vs `yarn start` which is effectively a Console
Subsystem app.
This commit is contained in:
Anaïs Betts 2024-11-20 14:41:53 +01:00
commit 17a32b14d4
No known key found for this signature in database

View file

@ -112,6 +112,7 @@ export class StdioClientTransport implements Transport {
env: this._serverParams.env ?? getDefaultEnvironment(),
stdio: ["pipe", "pipe", this._serverParams.stderr ?? "inherit"],
shell: false,
detached: process.platform === "win32",
signal: this._abortController.signal,
},
);