← Back to issue list

Craft-cli crashes when rendering positional arguments in help messages

View original Github issue

Metadata

Project
craft-cli
Number
#308
Type
issue
State
closed
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Fixed in commit 6dab8d6 by hiding positional arguments without help text, preventing craft-cli help rendering from crashing.

Resolution: closed resolved

Reason: Commit 6dab8d6, titled “fix: hide positional arguments with no help,” implements the maintainer-confirmed fix for undocumented positional arguments.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### What needs to get done Do not crash if a positional argument has no help text [here](https://github.com/canonical/craft-cli/blob/f547a04ff19372c7747a41cc3ded45731d4e5598/craft_cli/helptexts.py#L72). ### Why it needs to get done Craft-cli 2.8.0 [added support](https://github.com/canonical/craft-cli/pull/271/files#diff-2742d7ab39b1a86f8f7e964667b45b35bcfefba07335139c2bcabdd6e50d45eaR315) for rendering positional arguments in help messages. If the argument does not have help text, craft-cli crashes. source: https://github.com/canonical/snapcraft/issues/5169

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed in commit 6dab8d6 by hiding positional arguments without help text, preventing craft-cli help rendering from crashing.
stealth/space-bunny-alpha — closed resolved Fixed by commit 6dab8d6, which hides positional arguments with no help text so help rendering no longer crashes.
stealth/space-bunny-alpha — closed resolved Fixed in craft-cli commit 6dab8d6 by hiding positional arguments without help text, preventing help-rendering crashes.
qwen/qwen3.6-35b-a3b — — Resolved by hiding positional arguments without help text instead of crashing. The maintainer confirmed this approach fixes the help rendering crash.
qwen/qwen3.6-35b-a3b — — Resolved by hiding positional arguments without help text, preventing the crash during help message rendering.
qwen/qwen3.6-35b-a3b — — Fixed by hiding parameters that lack help messages, preventing crashes when rendering positional arguments in help messages. The issue was closed after maintainer review confirmed this approach resolves the rendering error.

Update history

No update history recorded yet.

Related work

  • Caused By: canonical/craft-cli#271 (confidence 100%)

    The positional-argument help feature introduced in #271 exposed the crash when help text was absent.

  • Related To: canonical/snapcraft#5169 (confidence 100%)

    The issue identifies snapcraft#5169 as the originating report.

Related issues

Issue Project State Summary Similarity
#309 fix: hide positional arguments with no help craft-cli merged Merged PR #309 (commit 6dab8d6), hiding positional arguments without help while preserving syntax parsing; released in craft-cli 2.11.0.
79%
#271 feat: display positional args in help craft-cli merged PR #271 was merged, adding positional arguments to Craft CLI command help output in commit 73e896e.
74%