snapcraft isn't context aware in displaying help text

Bug #1990549 reported by Dilyn
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Callahan Kovacs

Bug Description

When using snapcraft 7.x and attempting to build a core20 base snap, the options available from snapcraft --help are in general not available when building the snap. For example, --verbosity is not a valid option when using snapcraft 7 to build a core20 base snap:

dilyn@Ares:~work/test -> snapcraft --verbosity=verbose
Starting Snapcraft 7.1.4.post49+git3a54031c
Logging execution to '/root/.cache/snapcraft/log/snapcraft-20220922-112604.562413.log'
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
Try 'snapcraft -h' for help.

Error: No such option: --verbosity Did you mean --version?

I would expect that snapcraft --help would display context-aware options -- based on the base declared in the snapcraft.yaml for the snap I am building, it should display the flags which will govern its behavior in building said snap.

Revision history for this message
Dilyn (dilyn-corner) wrote :

Reconfirming that this issue is still present in both latest/stable (rev. 8931) and latest/edge (rev 9020):

dilyn@Ares:~/test -> snapcraft --verbosity=verbose
Starting Snapcraft 7.3.1.post31+git0b95d4c7
Logging execution to '/home/dilyn/.local/state/snapcraft/log/snapcraft-20230327-115030.405829.log'
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
Try 'snapcraft -h' for help.

Error: No such option: --verbosity (Possible options: --verbose, --version)

Changed in snapcraft:
assignee: nobody → Callahan Kovacs (mr-cal)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.