.forge/issues/9c980dd0-e76b-4ff9-876f-40eec632d434/issue.md 668 B 30 lines Raw

id: 9c980dd0-e76b-4ff9-876f-40eec632d434 title: Unknown top-level subcommand exits 0 state: closed labels:


Problem

An unknown top-level subcommand prints an error and help, then exits 0. Scripts that typo build/serve continue as if the command succeeded.

Verified:

$ hu13 nope
hu13: unknown subcommand 'nope'
...
$ echo $?
0

src/main.rs:493-497. Unknown options and unknown inbox subcommands correctly return 2, so this is inconsistent.

Fix

Return 2 from the unknown-subcommand arm; add a CLI exit-code test.

view raw