Skip to content

Vercel: read a short flag group (-dT team, -dt token) the way Vercel does (#125) - #128

Merged
paureis merged 5 commits into
mainfrom
fix/125-vercel-short-groups
Oct 23, 2026
Merged

paureis merged 5 commits into
mainfrom
fix/125-vercel-short-groups

Conversation

@paureis

@paureis paureis commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Closes #125.

Vercel parses flags with arg 5.0.0, which splits a short group (-dT) into one flag per letter and gives the next word to the group's last letter. So vercel -dT B deploy runs on team B. cloudpin read -T only as a word of its own, so it checked the active team. -dt TOKEN switched accounts unseen, and vercel -dT whoami deploy counted as the exempt whoami.

The Vercel provider now splits short groups the way arg does (splitShortGroups in src/providers/vercel.ts) before every value read and before finding the command words. The shared flagValue and commandWords (src/args.ts) are unchanged; #118/#120 change them for 1.3.0.

Checks

  • test/vercel-short-groups.test.ts (new, fake Exec): before the fix, 16 failed and 5 controls passed; after it, 21 of 21 pass.
  • Mutation checks: disabling the split brings back the same 16 failures; leaving isExempt unsplit fails 6.
  • npm run typecheck: exit 0. npm test: 1157 passed, 8 skipped.
  • Read-only real-account control with the built CLI: explain -- vercel -dT nonexistent-team-zz9 ls now reports that team and blocks, like -T nonexistent-team-zz9; -dT whoami deploy blocks and is not exempt; plain vercel ls still reports the active team.

🤖 Generated with Claude Code

paureis and others added 5 commits October 23, 2026 15:39
Vercel parses flags with arg 5.0.0, which splits -dT into -d -T and gives
the next word to a last letter that takes a value. The Vercel provider
read -T, -S, -t and -Q only as words of their own, so `vercel -dT B deploy`
was checked against the active team, `-dt TOKEN` ran as another account,
and `-dT whoami deploy` counted as the exempt whoami.

The provider now splits short groups before reading flags and command
words. The shared flagValue is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paureis paureis added this to the 1.2.0 milestone Oct 23, 2026
@paureis
paureis merged commit 7e0ebcc into main Oct 23, 2026
5 checks passed
@paureis
paureis deleted the fix/125-vercel-short-groups branch October 23, 2026 21:04
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.

Vercel: a short flag group (-dT team, -dt token) picks the account without cloudpin seeing it

1 participant