Skip to content

CLI: bare global --netuid without value yields misleading Click error #238

@moorsecopers99

Description

@moorsecopers99

Description

Severity: S3 (UX — contradicts global-flag docs)

Location: allways/cli/swap_commands/helpers.pyparse_global_flags()

When --netuid appears without a following token, the global-flag stripper does not consume it; it stays on argv, and Click reports No such option: --netuid on the subcommand. Operators expect global flags to work uniformly.

Steps to reproduce

  1. alw view rates --netuid (nothing after --netuid)

Expected behaviour

Actual behaviour

  • Error: No such option: --netuid.

Screenshots

Image

Fix

  • In parse_global_flags, detect --netuid with missing value (or --netuid= with empty RHS) and raise click.UsageError before Click sees unknown options.

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