Skip to content

fix(cli): parse negative numbers as positional arguments - #42324

Closed
Lazizbek Ergashev (lazerg) wants to merge 2 commits into
microsoft:mainfrom
lazerg:fix-42321
Closed

fix(cli): parse negative numbers as positional arguments#42324
Lazizbek Ergashev (lazerg) wants to merge 2 commits into
microsoft:mainfrom
lazerg:fix-42321

Conversation

@lazerg

@lazergLazizbek Ergashev (lazerg) commented Aug 20, 2026

Copy link
Copy Markdown

Summary

  • playwright-cli mousewheel 0 -100 failed with Unknown options: --0, --1, so scrolling up was not possible. The vendored minimist sends anything matching /^-[^-]+/ down the short-flag branch, and -100 matches.
  • Skip that branch for signed numbers so they land in _, like commander and yargs do.
  • Added the scroll-up example to the CLI skill, which only ever showed mousewheel 0 100.

Fixes#42321

Sign up for freeto 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.

[CLI]: Negative positional arguments are parsed as flags, breaking mousewheel scroll-up

2 participants

@lazerg@yury-s