From 8e4fc5e0749a52b98e89e214615dd2bb29cfeefa Mon Sep 17 00:00:00 2001 From: Jah-yee <166608075+Jah-yee@users.noreply.github.com> Date: Wed, 30 Sep 2026 03:37:18 +0800 Subject: [PATCH] fix: exit 1 for unknown top-level verb instead of 0 Unknown verbs (e.g. 'adlc-cli factory-mission') currently print help and exit 0. Callers checking the exit code see success for a command that did nothing. Fix: return 1 in the top-level default case, consistent with how sub-commands (skills/team/workspace/workflow) handle unknown subcommands (print error + help, return 1). --- src/dispatch.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dispatch.mjs b/src/dispatch.mjs index 11aae3d..07350f1 100644 --- a/src/dispatch.mjs +++ b/src/dispatch.mjs @@ -152,9 +152,11 @@ function runNewTree({ command, args, flags }, argv) { console.log(`adlc-cli ${VERSION}`); return 0; case "help": - default: printCliHelp(); return 0; + default: + printCliHelp(); + return 1; } }