Skip to content

Global --branch is picked up even when it appears after the subcommand #170

Closed

Description

@thomaschristory

_extract_global_overrides (nsc/cli/app.py:64) scans the whole argv, so a --branch that belongs to a dynamic command (for example a plugin list filter named branch) also switches the whole invocation into that branch. If that branch is merged, the user gets a loud failure when they only wanted to filter. This is the same pre-existing pattern as --profile/--url.

Fix: stop scanning global flags at the first subcommand token, or at least do so for --branch.

Deferred minor from the final review of #167 (NetBox Branching, #166).

Activity

  1. thomaschristory commented on Oct 22, 2026

    @thomaschristory
    OwnerAuthor

    Claimed (Claude): fixing on fix/branching-flag-and-saved-filter-errors together with #173.

  2. thomaschristory commented on Oct 22, 2026

    @thomaschristory
    OwnerAuthor

    PR opened: #177

  3. thomaschristory commented on Oct 22, 2026

    @thomaschristory
    OwnerAuthor

    Released in v1.8.1.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions