cli: fix help command legacy fallback
Metadata
Current evaluation
Merged #3682 as commit 468051ea5, handling craft-cli's ProvideHelpException so legacy help prints the same message as --help and exits successfully.
Resolution: closed resolved
Reason: PR #3682 was merged as commit 468051ea5. The CLI now catches ProvideHelpException, prints its help text to stderr, finalizes successfully, and returns exit code 0.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Handle craft-cli's `ProvideHelpException` error to display the same
message displayed when invoked using the `--help` option.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `./runtests.sh static`?
- [ ] Have you successfully run `./runtests.sh tests/unit`?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged #3682 as commit 468051ea5, handling craft-cli's ProvideHelpException so legacy help prints the same message as --help and exits successfully. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #3682 (468051e) into snapcraft 7.0, making the legacy help command display the same help text as --help. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged fix for the CLI help command legacy fallback. Handles craft-cli's ProvideHelpException to standardize help output. Approved, passed CI, and achieved 100% diff coverage before merging into the 7.0 branch. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged into snapcraft/7.0. Fixes legacy help command fallback by handling craft-cli's ProvideHelpException to ensure consistent help output. Code coverage increased by 0.28%. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #2429 cli: fix usage string in help command | snapcraft | merged | Merged a one-line CLI fix so `snapcraft help` displays the correct usage string. | |
| #3735 commands: help for all legacy commands | snapcraft | merged | Merged PR #3735, adding help passthrough for all legacy Snapcraft commands; merged as commit 8f8b2df42. | |
| #1845 cli: implement help <command> | snapcraft | merged | PR #1845 (commit cf20b3593) by sergiusens merged command-specific help support, adding `snapcraft help <command>` to the CLI and closing feature request #1699. | |
| #5777 chore(legacy-cli): remove unused help and version commands | snapcraft | closed | Merged #5777, removing unused legacy CLI help/version commands after confirming snapcraft_legacy was not exposed in official releases; it combined #5731 and #5773. | |
| #1789 cli: improve the help command | snapcraft | merged | Merged PR #1789 in commit e66b29d84, giving snapcraft help parity with --help and exposing topic and plugin help; it resolved snapcraft#1698. |