Replies: 2 comments
-
|
Thanks. Had similar issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks folks, just experienced this today and this saved me a lot of time! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So I was playing around with clap for the first time and started going straight for subcommands with 1 required argument and multiple optional arguments. well every single time I tried a optional argument I would always get:
error: unexpected argument '--arg' foundand assumed that was a generic clap response for a argument not found.
which made me assume I was doing something wrong, so I went through all the docs I could find, trying different things / altering other example to my needs. Everything I tried failed.
So after about 5 hours of trying to get clap to work and seeing many examples of people running cargo with:
cargo run -- ProgramI decided to change the default run command in RustRover :
run --package Program --bin Programwhich I always changed to:
run --package Program --bin Program subcommand required --arg valTo this:
run -- Program subcommand required --arg val....5 hours
So I guess since the default command was using optional
--arguments it made cargo think my arguments were its.So anyone using RustRover might want to consider changing the default run command.
anyway I thought I would give a heads up for anyone that wants to listen to my rant.
Beta Was this translation helpful? Give feedback.
All reactions