Fix CLI arg routing and desktop install links

This commit is contained in:
Mohamed Boudra
2026-04-04 16:35:31 +07:00
parent c3313ff82a
commit d69fcb861d
9 changed files with 317 additions and 30 deletions
+3 -2
View File
@@ -1,10 +1,11 @@
import { createCli } from "./cli.js";
import { isPathLikeArg, openDesktopWithProject } from "./commands/open.js";
import { openDesktopWithProject, shouldOpenProjectArg } from "./commands/open.js";
const program = createCli();
const knownCommands = new Set(program.commands.map((command) => command.name()));
const firstArg = process.argv[2];
if (firstArg && isPathLikeArg(firstArg)) {
if (firstArg && shouldOpenProjectArg({ arg: firstArg, knownCommands })) {
await openDesktopWithProject(firstArg);
} else {
if (process.argv.length <= 2) {