Given a subcommand they do not have, secret vault, secret unlocker, secret version and secret generate printed their help and exited 0, so a script could not tell secret vault improt from a command that worked. Each now exits 1 with unknown command "improt" for "secret vault" followed by its usage, as any wrongly called command does. Given no arguments, each still prints its help and exits 0.
Cobra looks at a command's Args only when the command has a RunE; without one it prints the help for any argument first. Each of the four parents therefore gets Args: cobra.NoArgs and a RunE that prints its help. Setting Args alone has no effect.
TestUnknownSubcommandFails runs the built binary for each parent, once with an unknown subcommand and once with nothing. TestNoVaultImportCommand (from #139) required the old answer to secret vault import, which the issue names as a command that must fail; it now requires the error.
Judgement call: the help of these four commands gains a usage line such as secret vault [flags], which cobra adds for any command that runs.
Judgement call: secret vault help used to print the help by accident and now fails like any other unknown subcommand; secret help vault and secret vault --help still work.
README.md describes neither behaviour, so it is unchanged.
Model: opus-5-5
Given a subcommand they do not have, `secret vault`, `secret unlocker`, `secret version` and `secret generate` printed their help and exited 0, so a script could not tell `secret vault improt` from a command that worked. Each now exits 1 with `unknown command "improt" for "secret vault"` followed by its usage, as any wrongly called command does. Given no arguments, each still prints its help and exits 0.
Issue: https://git.eeqj.de/sneak/secret/issues/183
Cobra looks at a command's `Args` only when the command has a `RunE`; without one it prints the help for any argument first. Each of the four parents therefore gets `Args: cobra.NoArgs` and a `RunE` that prints its help. Setting `Args` alone has no effect.
`TestUnknownSubcommandFails` runs the built binary for each parent, once with an unknown subcommand and once with nothing. `TestNoVaultImportCommand` (from https://git.eeqj.de/sneak/secret/issues/139) required the old answer to `secret vault import`, which the issue names as a command that must fail; it now requires the error.
- Judgement call: the help of these four commands gains a usage line such as `secret vault [flags]`, which cobra adds for any command that runs.
- Judgement call: `secret vault help` used to print the help by accident and now fails like any other unknown subcommand; `secret help vault` and `secret vault --help` still work.
- `README.md` describes neither behaviour, so it is unchanged.
Model: opus-5-5
Given a subcommand they do not have, `secret vault`, `secret unlocker`,
`secret version` and `secret generate` printed their help and exited 0,
so a mistyped command looked like a successful one. Each now exits 1
with `unknown command "<name>" for "secret <parent>"`, and with no
arguments still prints its help.
Cobra checks a command's Args only when it has a RunE, so each parent
gets `Args: cobra.NoArgs` and a RunE that prints its help. Args alone
changes nothing. TestNoVaultImportCommand required the old answer to
`secret vault import` and now requires the error.
Judgement call: their help now shows a `secret <parent> [flags]` usage
line, which cobra adds for any command that runs.
Judgement call: `secret vault help` now fails as an unknown subcommand;
`secret help vault` and `secret vault --help` still work.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Given a subcommand they do not have,
secret vault,secret unlocker,secret versionandsecret generateprinted their help and exited 0, so a script could not tellsecret vault improtfrom a command that worked. Each now exits 1 withunknown command "improt" for "secret vault"followed by its usage, as any wrongly called command does. Given no arguments, each still prints its help and exits 0.Issue: #183
Cobra looks at a command's
Argsonly when the command has aRunE; without one it prints the help for any argument first. Each of the four parents therefore getsArgs: cobra.NoArgsand aRunEthat prints its help. SettingArgsalone has no effect.TestUnknownSubcommandFailsruns the built binary for each parent, once with an unknown subcommand and once with nothing.TestNoVaultImportCommand(from #139) required the old answer tosecret vault import, which the issue names as a command that must fail; it now requires the error.secret vault [flags], which cobra adds for any command that runs.secret vault helpused to print the help by accident and now fails like any other unknown subcommand;secret help vaultandsecret vault --helpstill work.README.mddescribes neither behaviour, so it is unchanged.Model: opus-5-5
7dfa13a76fto596ebf0918Review passed.
Model: opus-5-5