Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling undefined build profile #6285

Open
antico5 opened this issue Feb 14, 2025 · 0 comments
Open

Handling undefined build profile #6285

antico5 opened this issue Feb 14, 2025 · 0 comments
Assignees
Labels
status:triaging v-next A Hardhat v3 development task
Milestone

Comments

@antico5
Copy link
Contributor

antico5 commented Feb 14, 2025

Version of Hardhat

alpha

What happened?

  • Specifying a build profile that doesn't exist, when no profiles property is present, it gets you TypeError: Cannot read properties of undefined (reading 'overrides') . Probably should tell either that the build profile doesn't exist, or there are no build profiles defined at all.
  • When profiles are defined, but the specified doesnt exist, it gives the same error. In this case it should tell that the profile doesnt exist.

Minimal reproduction steps

Create a new hardhat project. Run npx hardhat compile --build-profile foo, try with and without profiles property on the hardhat config file.

Search terms

No response

@antico5 antico5 added the v-next A Hardhat v3 development task label Feb 14, 2025
@antico5 antico5 added this to the Public Alpha milestone Feb 14, 2025
@antico5 antico5 added this to Hardhat Feb 14, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:triaging v-next A Hardhat v3 development task
Projects
Status: Backlog
Development

No branches or pull requests

2 participants