Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make --version a non-global option? #142

Open
mkniewallner opened this issue May 28, 2022 · 0 comments
Open

Make --version a non-global option? #142

mkniewallner opened this issue May 28, 2022 · 0 comments
Milestone

Comments

@mkniewallner
Copy link
Member

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:

$ poetry add httpx --version
Poetry (version 1.2.0b2.dev0)

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 or poetry list --version would display the version, but poetry add httpx --version would raise The 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.

@Secrus Secrus added this to the 1.0 milestone Sep 5, 2022
@Secrus Secrus modified the milestones: 1.0, 1.1 Oct 31, 2022
@Secrus Secrus modified the milestones: 2.1 , Future Jan 22, 2023
@Secrus Secrus modified the milestones: Future, 3.0 Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants