Skip to content

Commit 20d78b7

Browse files
feature: add configuration option for shell of stdio client
1 parent 7146eed commit 20d78b7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/client/stdio.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ export type StdioServerParameters = {
1717
*/
1818
args?: string[];
1919

20+
/**
21+
* Whether to use a shell to execute the command, or the shell to use.
22+
*
23+
* If not specified, the default is false.
24+
*/
25+
shell?: string | boolean;
26+
2027
/**
2128
* The environment to use when spawning the process.
2229
*
@@ -128,7 +135,7 @@ export class StdioClientTransport implements Transport {
128135
...this._serverParams.env,
129136
},
130137
stdio: ["pipe", "pipe", this._serverParams.stderr ?? "inherit"],
131-
shell: false,
138+
shell: this._serverParams.shell ?? false,
132139
signal: this._abortController.signal,
133140
windowsHide: process.platform === "win32" && isElectron(),
134141
cwd: this._serverParams.cwd,

0 commit comments

Comments
 (0)