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

Function spawnProcess

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

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 4

formatMissingUvxGuidanceFunction · 0.90
errorMethod · 0.80
isEnoentErrorFunction · 0.70

Tested by

no test coverage detected