Skip to content

Yaml Parsing of "conflicts_with" should be able to process a single value #614

Closed
@Gilnaa

Description

@Gilnaa

#513 Currently, when using the following yaml notation:

args:
    - verbose:
        short: v
        long: verbose
        help: Output verbose CLI output
        conflicts_with: quiet

    - quiet:
        short: q
        long: quiet
        help: Supress non-error messages.
        conflicts_with: verbose

the parsing will panic due to the following lines: (it is initially unclear as to why)

"conflicts_with" => {
                    for ys in v.as_vec().unwrap() {

The example says that:

# Conflicts, mutual overrides, and requirements can all be defined as a
# list, where the key is the name of the other argument

but it does not say that they must be defined as a list.

It is unclear whether this is a bug or not, but the example definitely misinforms the user as for the correct usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions