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

--version flag no longer exists #181

Closed
lopopolo opened this issue Feb 8, 2022 · 2 comments · Fixed by #182
Closed

--version flag no longer exists #181

lopopolo opened this issue Feb 8, 2022 · 2 comments · Fixed by #182
Labels
bug Something isn't working

Comments

@lopopolo
Copy link

lopopolo commented Feb 8, 2022

Describe the bug
I have been invoking cargo-about --version to check whether cargo-about is installed in a script before kicking off a cargo install cargo-about only if it is required.

It appears the --version flag no longer exists

To Reproduce

$ cargo about --version
error: Found argument '--version' which wasn't expected, or isn't valid in this context

        If you tried to supply `--version` as a value rather than a flag, use `-- --version`

USAGE:
    cargo-about [OPTIONS] <SUBCOMMAND>

For more information try --help
$ cargo-about --version
error: Found argument '--version' which wasn't expected, or isn't valid in this context

        If you tried to supply `--version` as a value rather than a flag, use `-- --version`

USAGE:
    cargo-about [OPTIONS] <SUBCOMMAND>

For more information try --help
$ cargo about -- --version
error: Found argument '--version' which wasn't expected, or isn't valid in this context

        If you tried to supply `--version` as a value rather than a flag, use `-- --version`

USAGE:
    cargo-about [OPTIONS] <SUBCOMMAND>

For more information try --help
$ cargo-about -- --version
error: Found argument '--version' which wasn't expected, or isn't valid in this context

        If you tried to supply `--version` as a value rather than a flag, use `-- --version`

USAGE:
    cargo-about [OPTIONS] <SUBCOMMAND>

For more information try --help

Expected behavior

cargo about --version and cargo-about --version output the version of the executable and exit with a success status code.

@lopopolo lopopolo added the bug Something isn't working label Feb 8, 2022
@lopopolo
Copy link
Author

lopopolo commented Feb 8, 2022

I suspect #178 is implicated in this regression, but I have not bisected.

@Jake-Shadle
Copy link
Member

Yes you are correct, clap doesn't automatically add version/author etc metadata like structopt does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants