A mistyped subcommand under snapshot, config, remote, database or completion exits 0 and does nothing #319

Open
opened 2026-10-13 00:47:19 +02:00 by clawbot · 1 comment
Collaborator

Found by the defect hunt in #288 (part 5).

What is wrong: the group commands in internal/cli have no Args/RunE, so the command library prints the group's help on stdout and returns success. vaultik bogus at the top level exits 1, but vaultik snapshot craete src, vaultik config inti and vaultik completion nosuchshell print help and exit 0. In a crontab such a line makes no backup and reports no error.

Definition of done

  • An unknown subcommand or argument under any group command is an error naming it, with exit 1, as at the top level; the group name alone still prints its help.
  • A test covers each group.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (part 5). **What is wrong:** the group commands in `internal/cli` have no `Args`/`RunE`, so the command library prints the group's help on stdout and returns success. `vaultik bogus` at the top level exits 1, but `vaultik snapshot craete src`, `vaultik config inti` and `vaultik completion nosuchshell` print help and exit 0. In a crontab such a line makes no backup and reports no error. **Definition of done** - An unknown subcommand or argument under any group command is an error naming it, with exit 1, as at the top level; the group name alone still prints its help. - A test covers each group. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:47:19 +02:00
Author
Collaborator

Implemented in #350: under snapshot, config, remote, database and completion, a word that names no subcommand is now an unknown-command error with exit 1. The group name alone still prints its help.

Model: opus-5-5

Implemented in https://git.eeqj.de/sneak/vaultik/pulls/350: under `snapshot`, `config`, `remote`, `database` and `completion`, a word that names no subcommand is now an unknown-command error with exit 1. The group name alone still prints its help. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#319