Skip to content

conflicts="--b --c" is accepted but silently unenforced #1598

Closed

Description

@BatmanAoD

Issue drafted by Cluade Sonnet 5.5


Version: usage 7.1.3

Repro:

#!/usr/bin/env -S usage bash
#USAGE flag "--a" conflicts="--b --c"
#USAGE flag "--b"
#USAGE flag "--c"
echo ok

./script --a --b and ./script --a --c both print ok.
Expected: error Invalid flag --a: conflicts with --b.

Observed:

  • conflicts="--b" works.
  • conflicts="--b --c" loads without error and enforces nothing.
    The whole string appears to be treated as a single flag name.
  • Repeating the property (conflicts="--b" conflicts="--c") enforces only the last one.
  • The child-node form flag "--a" { conflicts "--b" "--c" } works as expected.

Expected:

  • Either parse a space-separated list in the property, or reject it at spec-load time (for example, "conflicts references unknown flag --b --c").
  • The flag reference page documents only the single-value property form.
    Please also document the child-node form for several conflicts.

Activity

  1. github-actions commented on Nov 1, 2026

    @github-actions
    Contributor

    Fixed in v7.1.5 by #1599.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions