-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Cargo not passing arguments to binary #1855
Comments
This is part of our option parsing, you need to pass |
Ahh great that works fine. Thanks! |
Sounds like a reasonable idea! reopening as a docs bug to add info about |
Shouldn't the usage just be changed from: |
Unfortunately that would require |
The
cargo run
command passes arguments like1 2 3
or<filename>
to the binary, but sees flags as arguments to cargo itself.I have a crate which produces an executable which takes flags in the form of
./<mybinary> -r 4
. Executingcargo run --bin <targetname> 4
works fine, butcargo run --bin <targetname> -r 4
gives the error:So, it looks like Cargo is trying to parse arguments intended for my binary. I think all arguments after
--bin <targetname>
should be passed straight to the executable. Arguments to cargo would then have to be before--bin
.My version info:
The text was updated successfully, but these errors were encountered: