MCPcopy Create free account
hub / github.com/agent-tower/core / buildPtyCommand

Function buildPtyCommand

packages/server/src/utils/process-launch.ts:250–255  ·  view source on GitHub ↗
(programPath: string, args: string[])

Source from the content-addressed store, hash-verified

248 return '"' + arg.replace(/\\/g, '\\\\').replace(/"/g, '\\"') + '"';
249 }
250 return arg;
251}
252
253function spawnCmd(args, stdioOpt) {
254 const cmdLine = [programPath, ...args].map(escapeArgForCmd).join(' ');
255 return spawn(process.env.ComSpec || 'cmd.exe', ['/d', '/s', '/c', '"' + cmdLine + '"'], {
256 stdio: stdioOpt,
257 env: getChildEnv(),
258 windowsVerbatimArguments: true,

Callers 3

spawnInternalFunction · 0.85

Calls 1

getNodeRuntimeCommandFunction · 0.85

Tested by 1