← Back to issue list

internal error when running command with invalid parameters

View original Github issue

Metadata

Project
craft-application
Number
#89
Type
issue
State
closed
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Closed without a documented fix, linked PR, or closing explanation; the sole comment only proposed alternative wording for command errors.

Resolution: closed stale

Reason: No resolving PR or commit is recorded. @cmatsuoka's 2023-10-02 comment suggested better command-error wording but did not indicate that the invalid-parameter handling was implemented.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description When running an invalid command, we get a useful message: ``` $ rockcraft oakfdpao Usage: rockcraft [options] command [args]... Try 'rockcraft -h' for help. Error: no such command 'oakfdpao ``` However, when using a command line with a valid command but an invalid parameter, we get a message as if this were an internal error in the application: ``` $ rockcraft pack --oakfdpao rockcraft internal error: ArgumentParsingError("Usage: rockcraft [options] command [args]...\nTry 'rockcraft pack -h' for help.\n\nError: unrecognized arguments: --oakfdpao\n") Full execution log: '/home/tiago/.local/state/rockcraft/log/rockcraft-20231002-190658.059266.log' ``` ### To Reproduce Run `<appname> pack --invalid-param` ### part yaml ```shell n/a ``` ### Relevant log output ```shell rockcraft internal error: ArgumentParsingError("Usage: rockcraft [options] command [args]...\nTry 'rockcraft pack -h' for help.\n\nError: unrecognized arguments: --oakfdpao\n") Full execution log: '/home/tiago/.local/state/rockcraft/log/rockcraft-20231002-190658.059266.log' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed stale Closed without a documented fix, linked PR, or closing explanation; the sole comment only proposed alternative wording for command errors.
stealth/space-bunny-alpha — closed stale Invalid command parameters were reported as an internal ArgumentParsingError; the maintainer proposed a clearer command-error message.
qwen/qwen3.6-35b-a3b — — Closed without resolution. A maintainer noted the error message incorrectly displays full usage details and suggested a cleaner format. No pull request or fix was implemented.
qwen/qwen3.6-35b-a3b — — Closed without a documented fix or merge. The report highlighted misleading internal error messages for invalid command parameters, with a comment recommending cleaner CLI error formatting.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#459 internal error for "charmcraft revisions" charmcraft closed Closed with no documented fix, closing comment, or linked PR or commit; no repository change could be reliably tied to the closure.
71%