Skip to content

fix: stop parsing built-in CLI options after -- - #8866

Merged
kanej merged 1 commit into
NomicFoundation:mainfrom
hehuanlu:main
Nov 23, 2026
Merged

kanej merged 1 commit into
NomicFoundation:mainfrom
hehuanlu:main

Conversation

@hehuanlu

@hehuanlu hehuanlu commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor
  • I have read CONTRIBUTING.md and this PR follows its rules.
  • Because this PR includes a bug fix, it fixes a scenario real users can hit, and relevant tests have been included.

When a custom task accepts positional arguments, built-in options after a standalone -- are currently consumed by Hardhat. For example, npx hardhat my-task -- --version prints the Hardhat version instead of running the task.

Stop scanning for built-in global options at --, so subsequent arguments are passed to the task as positional arguments. Add regression tests for --version, --help, and --show-stack-traces after the separator, while confirming that task --version still prints the version. Include a patch changeset for hardhat.

Verification: Hardhat and its dependencies build successfully; all 108 CLI tests pass; ESLint and Prettier pass.

@changeset-bot

changeset-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3a4f851

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Signed-off-by: hehuanlu <hehuanlu@outlook.com>
@hehuanlu hehuanlu changed the title fix(mock-da): execute planned forks only once across cloned services fix: stop parsing built-in CLI options after -- Nov 20, 2026
@kanej
kanej self-requested a review November 23, 2026 11:06
@kanej kanej added no docs needed This PR doesn't require links to documentation no peer bump needed and removed status:triaging labels Nov 23, 2026

@kanej kanej left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hehuanlu

@kanej
kanej added this pull request to the merge queue Nov 23, 2026
Merged via the queue into NomicFoundation:main with commit 1d48599 Nov 23, 2026
196 of 200 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs needed This PR doesn't require links to documentation no peer bump needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants