← Back to issue list

Better output information when requesting help for a command with bad arguments for that command

View original Github issue

Metadata

Project
craft-cli
Number
#68
Type
issue
State
open
Author
facundobatista
Labels
Created
2022-03-07 14:53:21+00:00
Updated
2025-03-10 18:59:13+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

It's typical the following situation: Try to run a command with bad args... ``` myapp somecommand --bad-args ``` ...and then, when failed, ask for help on that: ``` myapp help somecommand --bad-args ``` Currently it fails because `--bad-args` is not really a valid argument for the help command. Real life example: ``` $ charmcraft help close --bad-args Usage: charmcraft [options] command [args]... Try 'charmcraft -h' for help. Error: Too many parameters when requesting help; pass a command, '--all', or leave it empty ``` It should detect that the first given parameter is actually a command name, and it should provide help for that command, no matter the invalid posterior options. Expected: ``` $ charmcraft help close --bad-args Usage: charmcraft close [options] <name> <channel> Summary: ... ```

Evaluation history

No evaluation history available.