← Back to issue list

`command --version` doesn't work if no default command is set

View original Github issue

Metadata

Project
craft-cli
Number
#141
Type
issue
State
open
Author
lengau
Labels
Created
2023-04-05 21:27:54+00:00
Updated
2023-04-05 21:27:54+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Actual behaviour: If a Dispatcher is created with `default_command=None` (the default), running a craft-cli dispatcher with just a `GlobalArgument` raises an `ArgumentParsingError` with general help text (line 419 of dispatcher.py) Expected behaviour: Global arguments do not need a command to be given, provided that they can be used independently.

Evaluation history

No evaluation history available.