Skip to content

refactor: scope the access-token required-flag skip per command#748

Draft
ffantl-ld wants to merge 1 commit into
mainfrom
ffantl/prerun-flag-skip
Draft

refactor: scope the access-token required-flag skip per command#748
ffantl-ld wants to merge 1 commit into
mainfrom
ffantl/prerun-flag-skip

Conversation

@ffantl-ld

Copy link
Copy Markdown
Contributor

Describe the solution you've provided

Commands that don't need an API token (completion, config, help, login, signup, whoami) previously skipped the required --access-token check by setting DisableFlagParsing = true. That also suppressed validation of the subcommand's own required flags.

This clears the --access-token required annotation on the specific flag instead, so those commands still parse and validate their own flags.

Related issues

Groundwork for the guided setup command (which also needs to run without a token). Split out so it can land and release on its own merit.

Additional context

Behavior-only change to cmd/root.go; no new packages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant