MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / spawnProcess

Function spawnProcess

scripts/dev-extra-backend.mjs:99–122  ·  view source on GitHub ↗
(command, args, options = {})

Source from the content-addressed store, hash-verified

97}
98
99function spawnProcess(command, args, options = {}) {
100 const child = spawn(
101 command,
102 args,
103 getProcessTreeSpawnOptions({
104 stdio: "inherit",
105 ...options,
106 }),
107 );
108
109 child.once("error", (error) => {
110 if (isEnoentError(error) && command === "uvx") {
111 console.error(formatMissingUvxGuidance(options?.cwd));
112 } else if (isEnoentError(error)) {
113 console.error(
114 `Failed to start ${command}. Make sure it is installed and on your PATH.`,
115 );
116 } else {
117 console.error(`Failed to start ${command}:`, error);
118 }
119 });
120
121 return child;
122}
123
124async function main() {
125 const config = buildExtraBackendConfig();

Callers 1

mainFunction · 0.70

Calls 5

formatMissingUvxGuidanceFunction · 0.90
errorMethod · 0.80
spawnFunction · 0.70
isEnoentErrorFunction · 0.70

Tested by

no test coverage detected