Make --version
a non-global option?
#142
Labels
enhancement
Improvement of an existing feature
Milestone
--version
a non-global option?
#142
As reported in python-poetry/poetry#5128,
--version
is currently a global option in cleo.This makes the behavior of some commands pretty weird, since passing
--version
to any command will exit the command early and print the version.For instance, in the case of Poetry:
This also prevents this option from being used for commands in other contexts, as the original issue in Poetry reports.
Proposal
As this is still nice to have
--version
option, maybe the option could only be available for the default command?That way, in the case of Poetry, doing either
poetry --version
orpoetry list --version
would display the version, butpoetry add httpx --version
would raiseThe option "--version" does not exist
, and in the future, we would be able to add--version
for specific commands if needed.Though this proposal would definitely be a breaking change worth mentioning.
The text was updated successfully, but these errors were encountered: