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 1
1
import { JSONRPCMessage } from "../types.js" ;
2
- import { StdioClientTransport , StdioServerParameters } from "./stdio.js" ;
2
+ import { StdioClientTransport , getDefaultServerParameters } from "./stdio.js" ;
3
3
4
- const serverParameters : StdioServerParameters = {
5
- command : "/usr/bin/tee" ,
6
- } ;
4
+ const serverParameters = getDefaultServerParameters ( ) ;
7
5
8
6
test ( "should start then close cleanly" , async ( ) => {
9
7
const client = new StdioClientTransport ( serverParameters ) ;
Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ export type StdioServerParameters = {
39
39
cwd ?: string ;
40
40
} ;
41
41
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
+
42
51
/**
43
52
* Environment variables to inherit by default, if an environment is not explicitly given.
44
53
*/
You can’t perform that action at this time.
0 commit comments