Hey there,
I am trying to find out the underlying HTTPs requests snapcraft is doing when doing list-validation-sets, for which I am trying to set the verbosity level when running a command.
snapcraft list-validation-sets --help
suggests that I can either use --verbose
or --verbosity + level
. However, when I try this the argument parser/dispatcher seems to fail.
If I try --verbose
, I get “No such option”:
charlee@lpks0013-ubuntu:/snap/snapcraft$ snapcraft list-validation-sets --verbose
Starting snapcraft, version 8.3.1
Logging execution to '/home/charlee/.local/state/snapcraft/log/snapcraft-20240902-111841.879390.log'
Usage: snapcraft list-validation-sets [OPTIONS]
Try 'snapcraft list-validation-sets -h' for help.
Error: No such option: --verbose
If I try --verbosity
it seems to acknowledge the option exists, but I am not using it right:
charlee@lpks0013-ubuntu:/snap/snapcraft$ snapcraft list-validation-sets --verbosity
Usage: snapcraft [options] command [args]...
Try 'snapcraft -h' for help.
Error: The 'verbosity' option expects one argument.
But then when I try to set the verbosity level it fails again (maybe I am not setting it right? but then the error message is wrong):
charlee@lpks0013-ubuntu:/snap/snapcraft$ snapcraft list-validation-sets --verbosity debug
2024-09-02 11:18:51.499 Starting snapcraft, version 8.3.1
2024-09-02 11:18:51.499 Logging execution to '/home/charlee/.local/state/snapcraft/log/snapcraft-20240902-111851.498721.log'
2024-09-02 11:18:51.499 Configuring application...
2024-09-02 11:18:51.499 Preparing application...
2024-09-02 11:18:51.500 Build plan: platform=None, build_for=None
2024-09-02 11:18:51.500 Running snapcraft list-validation-sets on host
Usage: snapcraft list-validation-sets [OPTIONS]
Try 'snapcraft list-validation-sets -h' for help.
Error: No such option: --verbosity
charlee@lpks0013-ubuntu:/snap/snapcraft$ snapcraft list-validation-sets --verbosity=debug
2024-09-02 11:18:55.927 Starting snapcraft, version 8.3.1
2024-09-02 11:18:55.927 Logging execution to '/home/charlee/.local/state/snapcraft/log/snapcraft-20240902-111855.926468.log'
2024-09-02 11:18:55.927 Configuring application...
2024-09-02 11:18:55.927 Preparing application...
2024-09-02 11:18:55.927 Build plan: platform=None, build_for=None
2024-09-02 11:18:55.928 Running snapcraft list-validation-sets on host
Usage: snapcraft list-validation-sets [OPTIONS]
Try 'snapcraft list-validation-sets -h' for help.
Error: No such option: --verbosity
FYI it is not the first time that I get the wrong error message out of the snapcraft
application, maybe it is worthwhile to look whether the logic is robust enough to catch wrong usage properly.
Kind regards, Charlee