#2613
feat(cli): name stray positional operands and the flag they probably meant
Summary
453 distinct installs across 251 commands (5.x, 14 days) passed a stray positional operand to a command that takes only flags, e.g. asc apps view 123, asc pricing availability create 37, asc builds list 33, asc auth login 26, asc bundle-ids list 26, asc screenshots list 23. The current error does not say which token was unexpected or what to do.
What to do
In the shared parse path, when a leaf command receives unexpected positionals, print Error: unexpected argument "123" plus, when the command has exactly one required or primary ID flag (--id, --app, --build-id, …), Did you mean: asc apps view --id 123. Exit 2. Never echo values into telemetry.
Acceptance criteria
- cmdtest for five commands above
- commands that legitimately take positionals (
search,schema,api,docs) unaffected
Activity
0No activity yet.