(command, args, options = {})
| 1154 | } |
| 1155 | |
| 1156 | function spawnProcess(command, args, options = {}) { |
| 1157 | const child = spawn( |
| 1158 | command, |
| 1159 | args, |
| 1160 | getProcessTreeSpawnOptions({ |
| 1161 | stdio: "inherit", |
| 1162 | ...options, |
| 1163 | }), |
| 1164 | ); |
| 1165 | |
| 1166 | child.once("error", (error) => { |
| 1167 | if (isEnoentError(error) && command === "uvx") { |
| 1168 | const msg = formatMissingUvxGuidance(options?.cwd); |
| 1169 | console.error(msg); |
| 1170 | fileLog("error", stripAnsi(msg)); |
| 1171 | } else if (isEnoentError(error)) { |
| 1172 | const msg = `Failed to start ${command}. Make sure it is installed and on your PATH.`; |
| 1173 | console.error(msg); |
| 1174 | fileLog("error", msg); |
| 1175 | } else { |
| 1176 | console.error(`Failed to start ${command}:`, error); |
| 1177 | fileLog("error", `Failed to start ${command}: ${error.message}`); |
| 1178 | } |
| 1179 | }); |
| 1180 | |
| 1181 | return child; |
| 1182 | } |
| 1183 | |
| 1184 | async function main() { |
| 1185 | console.log("Starting isolated agent-server + frontend dev stack..."); |
no test coverage detected