Skip to content

Argument doesn't conflict with subcommand even if it's set #5294

Answered by epage
nix-enthusiast asked this question in Q&A
Discussion options

You must be logged in to vote

This is a bug. Our handling of args_conflicts_with_subcommands is exclusive to subcommand names and not flags and we do this by checking if the flag if an arg doesn't exist (https://github.com/clap-rs/clap/blob/master/clap_builder/src/parser/parser.rs#L493) which means it likely is also broken with subcommand_precedence_over_arg

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nix-enthusiast
Comment options

@epage
Comment options

@nix-enthusiast
Comment options

Answer selected by nix-enthusiast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants