Repository navigation
Vercel: read a short flag group (-dT team, -dt token) the way Vercel does (#125) - #128
Merged
Merged
Conversation
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>
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.
Closes #125.
Vercel parses flags with
arg5.0.0, which splits a short group (-dT) into one flag per letter and gives the next word to the group's last letter. Sovercel -dT B deployruns on team B. cloudpin read-Tonly as a word of its own, so it checked the active team.-dt TOKENswitched accounts unseen, andvercel -dT whoami deploycounted as the exemptwhoami.The Vercel provider now splits short groups the way
argdoes (splitShortGroupsinsrc/providers/vercel.ts) before every value read and before finding the command words. The sharedflagValueandcommandWords(src/args.ts) are unchanged; #118/#120 change them for 1.3.0.Checks
test/vercel-short-groups.test.ts(new, fakeExec): before the fix, 16 failed and 5 controls passed; after it, 21 of 21 pass.isExemptunsplit fails 6.npm run typecheck: exit 0.npm test: 1157 passed, 8 skipped.explain -- vercel -dT nonexistent-team-zz9 lsnow reports that team and blocks, like-T nonexistent-team-zz9;-dT whoami deployblocks and is not exempt; plainvercel lsstill reports the active team.🤖 Generated with Claude Code