Conflicting Flags Error message contains the same flag twice #1622
Labels
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-bug
Category: Updating dependencies
E-easy
Call for participation: Experience needed to fix: Easy / not much
E-help-wanted
Call for participation: Help is requested to fix this issue.
Milestone
Rust Version
Affected Version of clap
Expected Behavior Summary
I have two conflicting flags
-d
and-D
. When the user passes-dD
I expect the output to containActual Behavior Summary
The output instead contains
Same happens if the flags have a long name as well.
Steps to Reproduce the issue
cargo new --bin debugcli
Set up Cargo.toml as follows:
Set up
src/main.rs
as follows:Run it with various combinations:
It is worth noting that in above pasted output, it is once
The argument '-D' cannot be used with '-D'
and onceThe argument '-d' cannot be used with '-d'
. But when you use the program exactly as I above, it will always beThe argument '-d' cannot be used with '-d'
.The program that produced the above output had one difference to the program I pasted here: It had a
conflicts_with = "debug"
annotation for theD
flag.Debug output
Debug Output
Please excuse if this has been already mentioned, I did not find any open issue for it.
The text was updated successfully, but these errors were encountered: