Fix desktop CLI passthrough tty handling (#791)

* Fix desktop CLI passthrough tty handling

* Fix desktop daemon manager test drift

* Update daemon stop test after main merge

* test(cli): isolate npx cache per CLI test
This commit is contained in:
Mohamed Boudra
2026-05-07 15:14:18 +08:00
committed by GitHub
parent 6fb2fe2283
commit faf664d803
20 changed files with 868 additions and 461 deletions
+4 -24
View File
@@ -1,26 +1,6 @@
import { createCli } from "./cli.js";
import { classifyInvocation } from "./classify.js";
import { openDesktopWithProject } from "./commands/open.js";
import { runCli } from "./run.js";
const program = createCli();
const knownCommands = new Set(program.commands.map((command) => command.name()));
const invocation = classifyInvocation({
argv: process.argv.slice(2),
knownCommands,
cwd: process.cwd(),
const exitCode = await runCli(process.argv.slice(2), {
nodeArgv: [process.argv[0] ?? "node", process.argv[1] ?? "paseo"],
});
switch (invocation.kind) {
case "cli": {
const argv = [...process.argv.slice(0, 2), ...invocation.argv];
if (invocation.argv.length === 0) {
argv.push("onboard");
}
program.parse(argv, { from: "node" });
break;
}
case "open-project":
await openDesktopWithProject(invocation.resolvedPath);
break;
}
process.exitCode = exitCode;