(command, args, options = {})
| 94 | } |
| 95 | |
| 96 | function 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 | |
| 117 | async function main() { |
| 118 | const config = buildExtraBackendConfig(); |
no test coverage detected