Repository navigation
fix(cli): reject flags that need another flag in preview deploy and env create - #622
Draft
PiquelChips wants to merge 1 commit into
Draft
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…nv create clap skips a `requires` rule when an argument that conflicts with the required one is present. `preview deploy <app> <preview>` accepted and ignored `--branch`, `--full-history` and `--allow-secret-files`, which need `--local`; `env create --promote-from <env> --commit <sha>` sent the commit to the daemon, which refused it after the confirmation prompt. The preview now also conflicts with the `--local` options, and `--promote-from` with `--commit`, so both are usage errors. Fixes PQD-166
PiquelChips
force-pushed
the
fix/cli-flags-needing-another-flag
branch
from
November 22, 2026 22:12
deb8c16 to
ba39f4b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Fixes PQD-166
clap skips a
requiresrule when an argument that conflicts with the required one is present, so two commands accepted flags they then ignored. This follows #613's fix forapp service add: the conflicting argument also conflicts with the flags that need it.preview deploy <app> <preview>accepted and ignored--branch,--full-historyand--allow-secret-files, which need--local.<PREVIEW>now also conflicts with theSnapshotArgsgroup.env create <app> <name> --promote-from <env> --commit <sha>was accepted although--commitneeds--branch. The daemon already refused the request (400 source_invalid, "a promoted environment follows no branch"), but only after the application lookup and the confirmation prompt.--promote-fromnow also conflicts with--commit.Both are now usage errors (exit 2) at parse time. No other
requiresrule in the CLI has the problem:analytics --envrequires--app, which conflicts with nothing, andsource git'sGitBuildArgsrequires a required positional.app service addis fixed by #613.Proof: new CLI tests in
tests/cli/environments.rsfail on main (exit 4: the CLI tries to reach a daemon) and pass now; they also check that a validpreview deployandenv create --branch --commitstill send the same request.--helpand the generated CLI reference are unchanged.Checklist
AGENTS.mdit applies to,documentation included, with its reverse states. (CLI-only parsing fix; the manifest and dashboard are unaffected.)
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)