MCPcopy Create free account
hub / github.com/wonderwhy-er/DesktopCommanderMCP / executeCommand

Function executeCommand

test/test-default-shell.js:18–29  ·  view source on GitHub ↗
(command, timeout_ms = 2000, shell = null)

Source from the content-addressed store, hash-verified

16// We need a wrapper because startProcess in tools/improved-process-tools.js returns a ServerResult
17// but our tests expect to receive the actual command result
18async function executeCommand(command, timeout_ms = 2000, shell = null) {
19 const args = {
20 command: command,
21 timeout_ms: timeout_ms
22 };
23
24 if (shell) {
25 args.shell = shell;
26 }
27
28 return await startProcess(args);
29}
30
31/**
32 * Check if a shell is available on the system

Callers 7

pythonREPLExampleFunction · 0.90
nodeREPLExampleFunction · 0.90
simplePythonTestFunction · 0.90
pythonREPLExampleFunction · 0.90
nodeREPLExampleFunction · 0.90
isShellAvailableFunction · 0.70
getShellFromCommandFunction · 0.70

Calls 1

startProcessFunction · 0.85

Tested by

no test coverage detected