(command, args, options = {})
| 801 | } |
| 802 | |
| 803 | function spawnProcess(command, args, options = {}) { |
| 804 | const child = spawn( |
| 805 | command, |
| 806 | args, |
| 807 | getProcessTreeSpawnOptions({ |
| 808 | stdio: "inherit", |
| 809 | ...options, |
| 810 | }), |
| 811 | ); |
| 812 | |
| 813 | child.once("error", (error) => { |
| 814 | if (isEnoentError(error) && command === "uvx") { |
| 815 | const msg = formatMissingUvxGuidance(options?.cwd); |
| 816 | console.error(msg); |
| 817 | fileLog("error", stripAnsi(msg)); |
| 818 | } else if (isEnoentError(error)) { |
| 819 | const msg = `Failed to start ${command}. Make sure it is installed and on your PATH.`; |
| 820 | console.error(msg); |
| 821 | fileLog("error", msg); |
| 822 | } else { |
| 823 | console.error(`Failed to start ${command}:`, error); |
| 824 | fileLog("error", `Failed to start ${command}: ${error.message}`); |
| 825 | } |
| 826 | }); |
| 827 | |
| 828 | return child; |
| 829 | } |
| 830 | |
| 831 | async function main() { |
| 832 | console.log("Starting isolated agent-server + frontend dev stack..."); |
no test coverage detected