#113 Unknown top-level subcommand exits 0

closedkind:buildopened
details
updated
id
9c980dd0-e76b-4ff9-876f-40eec632d434

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.

Comments (1)

all issues