Skip to content
New issue

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

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

Already on GitHub? # to your account

argument processing incorrect in cargo subcommand mode #40

Open
rbtcollins opened this issue May 9, 2023 · 0 comments
Open

argument processing incorrect in cargo subcommand mode #40

rbtcollins opened this issue May 9, 2023 · 0 comments

Comments

@rbtcollins
Copy link

rbtcollins commented May 9, 2023

The code that looks for --help in env.args()[1] is in lib.rs in the run function is faulty: when run as cargo build-all-features --help the args vector will look like so:

$ cargo build-all-features --help
Args: Args { inner: ["...\\.cargo\\bin\\cargo-build-all-features.exe", "build-all-features", "--help"] }    Building crate=cargo-all-features features=[]

That is, arg0 is the binary, arg1 is the subcommand name, arg2 is the first argument.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant