A path or URL named help or h runs urfave/cli's built-in help instead of the command, which prints the command's help and exits 0, even after --. So mfer check help --require-signature FPR checks nothing and passes, and mfer gen help and mfer freshen help write nothing. Every command in internal/cli/mfer.go gets the built-in help subcommand by default, and urfave/cli treats a first argument of help or h as that subcommand. Separately, mfer check DIR --help fails with No help topic for 'DIR' instead of printing check's help (the same happens on the --help DIR order). Found in the review of #197.
Reproduce on next (8f7170b): mkdir help; echo x > help/x.txt; mfer gen help prints generate's help and writes no manifest; mfer check help --require-signature <any fingerprint> exits 0.
Severity: major. A directory named help or h is never checked, and the check still passes.
Correct: help and h given to gen, check, freshen, fetch, list or export are paths or URLs like any other; --help (-h) anywhere on a command prints that command's help; mfer help and mfer help CMD keep working at the top level.
Definition of done
Failing tests first, through the CLI: gen help writes help/index.mf; check help on an unsigned manifest with --require-signature exits 1; check DIR --help and check --help DIR print check's help and exit 0; mfer help check still prints it.
The fix in internal/cli/mfer.go.
make check passes.
Model: opus-5-5
A path or URL named `help` or `h` runs urfave/cli's built-in help instead of the command, which prints the command's help and exits 0, even after `--`. So `mfer check help --require-signature FPR` checks nothing and passes, and `mfer gen help` and `mfer freshen help` write nothing. Every command in `internal/cli/mfer.go` gets the built-in `help` subcommand by default, and urfave/cli treats a first argument of `help` or `h` as that subcommand. Separately, `mfer check DIR --help` fails with `No help topic for 'DIR'` instead of printing `check`'s help (the same happens on the `--help DIR` order). Found in the review of https://git.eeqj.de/sneak/mfer/pulls/197.
Reproduce on `next` (8f7170b): `mkdir help; echo x > help/x.txt; mfer gen help` prints `generate`'s help and writes no manifest; `mfer check help --require-signature <any fingerprint>` exits 0.
Severity: major. A directory named `help` or `h` is never checked, and the check still passes.
Correct: `help` and `h` given to `gen`, `check`, `freshen`, `fetch`, `list` or `export` are paths or URLs like any other; `--help` (`-h`) anywhere on a command prints that command's help; `mfer help` and `mfer help CMD` keep working at the top level.
## Definition of done
- Failing tests first, through the CLI: `gen help` writes `help/index.mf`; `check help` on an unsigned manifest with `--require-signature` exits 1; `check DIR --help` and `check --help DIR` print `check`'s help and exit 0; `mfer help check` still prints it.
- The fix in `internal/cli/mfer.go`.
- `make check` passes.
Model: opus-5-5
clawbot
self-assigned this 2026-10-13 14:22:27 +02:00
#211 makes help and h arguments on gen, check, freshen, fetch, list and export, and makes --help print the command's help wherever it appears.
Model: opus-5-5
https://git.eeqj.de/sneak/mfer/pulls/211 makes `help` and `h` arguments on `gen`, `check`, `freshen`, `fetch`, `list` and `export`, and makes `--help` print the command's help wherever it appears.
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.
A path or URL named
helporhruns urfave/cli's built-in help instead of the command, which prints the command's help and exits 0, even after--. Somfer check help --require-signature FPRchecks nothing and passes, andmfer gen helpandmfer freshen helpwrite nothing. Every command ininternal/cli/mfer.gogets the built-inhelpsubcommand by default, and urfave/cli treats a first argument ofhelporhas that subcommand. Separately,mfer check DIR --helpfails withNo help topic for 'DIR'instead of printingcheck's help (the same happens on the--help DIRorder). Found in the review of #197.Reproduce on
next(8f7170b):mkdir help; echo x > help/x.txt; mfer gen helpprintsgenerate's help and writes no manifest;mfer check help --require-signature <any fingerprint>exits 0.Severity: major. A directory named
helporhis never checked, and the check still passes.Correct:
helpandhgiven togen,check,freshen,fetch,listorexportare paths or URLs like any other;--help(-h) anywhere on a command prints that command's help;mfer helpandmfer help CMDkeep working at the top level.Definition of done
gen helpwriteshelp/index.mf;check helpon an unsigned manifest with--require-signatureexits 1;check DIR --helpandcheck --help DIRprintcheck's help and exit 0;mfer help checkstill prints it.internal/cli/mfer.go.make checkpasses.Model: opus-5-5
#211 makes
helpandharguments ongen,check,freshen,fetch,listandexport, and makes--helpprint the command's help wherever it appears.Model: opus-5-5