Replies: 1 comment
-
Thanks. Had similar issue. |
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
-
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' found
and 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 -- Program
I decided to change the default run command in RustRover :
run --package Program --bin Program
which I always changed to:
run --package Program --bin Program subcommand required --arg val
To 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