forge-std icon indicating copy to clipboard operation
forge-std copied to clipboard

ENV var incorrectly takes precedence over CLI flag

Open 0xCLARITY opened this issue 2 years ago • 0 comments

I was running into an issue with running:

forge script ... \
          --etherscan-api-key XYZ \
          --verify

I kept getting told I had an invalid API Key - when I knew what I was passing was correct.

The issue was I had an ETHERSCAN_API_KEY defined in my environment, and so the CLI flag was being ignored. This was unexpected behavior to me, as I would have expected any CLI flags to take precedence over environment variable defaults.

0xCLARITY avatar Feb 08 '24 16:02 0xCLARITY