From a02dec921beb8a8e4d0fa6b83e1d2cf6b365a2e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barthelet?= Date: Mon, 29 Sep 2025 10:15:03 +0200 Subject: [PATCH] feature: add configuration option for shell of stdio client --- src/client/stdio.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/stdio.ts b/src/client/stdio.ts index d62a3aeb6..745a42fb9 100644 --- a/src/client/stdio.ts +++ b/src/client/stdio.ts @@ -17,6 +17,13 @@ export type StdioServerParameters = { */ args?: string[]; + /** + * Whether to use a shell to execute the command, or the shell to use. + * + * If not specified, the default is false. + */ + shell?: string | boolean; + /** * The environment to use when spawning the process. * @@ -125,7 +132,7 @@ export class StdioClientTransport implements Transport { ...this._serverParams.env }, stdio: ['pipe', 'pipe', this._serverParams.stderr ?? 'inherit'], - shell: false, + shell: this._serverParams.shell ?? false, signal: this._abortController.signal, windowsHide: process.platform === 'win32' && isElectron(), cwd: this._serverParams.cwd