Is --verbose meant to work?

While attempting to debug something unrelated:

$ snapcraft --version
snapcraft 7.1.3
$ snapcraft snap --use-lxd --verbose
Starting Snapcraft 7.1.3                                                                                
Logging execution to '/home/dave/.cache/snapcraft/log/snapcraft-20221005-153723.467789.log'             
Usage: snapcraft snap [OPTIONS] [DIRECTORY]
Try 'snapcraft snap -h' for help.

Error: No such option: --verbose
$ snapcraft --verbose snap --use-lxd
Starting Snapcraft 7.1.3                                                                                
Logging execution to '/home/dave/.cache/snapcraft/log/snapcraft-20221005-153632.013700.log'             
Usage: snapcraft [OPTIONS] COMMAND [ARGS]...
Try 'snapcraft -h' for help.

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

It’s listed in the --help output but doesn’t seem to work whether it’s given as a parameter of snapcraft itself, or the sub-command? Same appears to happen with --quiet and --verbosity too.

Incidentally, I’ve also tried with snapcraft 7.1.4 from the latest/candidate channel with the same result.

snapcraft 7.x defaults to LXD, my guess would be that the --use-lxd is confusing it and the complaint about --verbose is just fallout … try without --use-lxd

Nope, same error: “No such option: --verbose”

then try:

--verbosity=verbose

(this is what snapcraft --help points to)

(TBH i think it is the worst idea ever … making a development tool of which you need all info all the time to be completely quiet … quietening it should be an opt-in thing not opt-out )

$ snapcraft snap --verbosity=verbose
Starting Snapcraft 7.1.4                                                                                
Logging execution to '/home/dave/.cache/snapcraft/log/snapcraft-20221005-160835.551334.log'             
Usage: snapcraft snap [OPTIONS] [DIRECTORY]
Try 'snapcraft snap -h' for help.

Error: No such option: --verbosity

This is with 7.1.4 from candidate, but I wouldn’t be at all surprised if 7.1.3 in stable did the same…

well, my help output is from 7.1.3 … i’d kind of expect the tool to not lie in its own help text … especially for something that calls itself latest/stable :slight_smile:

snapcraft seems to list several (redundant?) methods of massaging verbosity:

$ snapcraft --help
Usage:
    snapcraft [help] <command>

Summary:    Package, distribute, and update snaps for Linux and IoT

Global options:
                       -h, --help:  Show this help message and exit
                    -v, --verbose:  Show debug information and be more
                                    verbose
                      -q, --quiet:  Only show warnings and errors, not
                                    progress
                      --verbosity:  Set the verbosity level to 'quiet',
                                    'brief', 'verbose', 'debug' or
                                    'trace'
...

well, at least they do consistently not work :slight_smile:

Ah, found the bug (after tracking down where snapcraft bugs are actually reported): LP: #1986643

1 Like