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
regression in handling of .env #7835
Comments
what is "global .env"? the load .env call that's being used does not replace existing vars |
@mattsse sorry typo. Wanted to write |
hmm this is odd
https://docs.rs/dotenvy/latest/dotenvy/fn.from_path.html Is there a way to reproduce this? |
sure, so just do: Then put |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (cafc260 2024-05-02T00:22:11.188280000Z)
What command(s) is the bug in?
forge script/test/etc
Operating System
macOS (Apple Silicon)
Describe the bug
Users of our tooling reported a lot of weird issues lately and i think i finally found the culprit which seems to be related to some change in how .env is handled.
In most our projects we seed some empty .env with things like
SENDER=
Up until recently #3847 (comment) this was the behavior in foundry: .env never overwrites global .env. It seems like in a recent nightly the behavior changed and now not only:
So if you e.g. define a:
it will overwrite your
MNEMONIC_INDEX
you might have defined in global env and leads to weird issues likea value is required for '--mnemonic-indexes <INDEXES>' but none was supplied
The text was updated successfully, but these errors were encountered: