File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11import { JSONRPCMessage } from "../types.js" ;
2- import { StdioClientTransport , StdioServerParameters } from "./stdio.js" ;
2+ import { StdioClientTransport , getDefaultServerParameters } from "./stdio.js" ;
33
4- const serverParameters : StdioServerParameters = {
5- command : "/usr/bin/tee" ,
6- } ;
4+ const serverParameters = getDefaultServerParameters ( ) ;
75
86test ( "should start then close cleanly" , async ( ) => {
97 const client = new StdioClientTransport ( serverParameters ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ export type StdioServerParameters = {
3939 cwd ?: string ;
4040} ;
4141
42+ // Configure default server parameters based on OS
43+ // Uses 'more' command for Windows and 'tee' command for Unix/Linux
44+ export const getDefaultServerParameters = ( ) : StdioServerParameters => {
45+ if ( process . platform === "win32" ) {
46+ return { command : "more" } ;
47+ }
48+ return { command : "/usr/bin/tee" } ;
49+ } ;
50+
4251/**
4352 * Environment variables to inherit by default, if an environment is not explicitly given.
4453 */
You can’t perform that action at this time.
0 commit comments