-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
unquoted .env vars with spaces not parsed correctly #2610
Comments
Where are you running
in
executes fine and it contains this line:
Edit: Also added a contract with a function that takes the string and returns it back, and it works as expected: |
Okay, I debugged it a bit more and found out it's because I had a variable set above FYI, in the very commonly used |
Wow, that's very surprising to me. I think I should just look for another .env crate because that is part of the actual "spec" and every other .env package supports that Thanks for debugging :) |
I think we solved something similar in the telegram chat by adding an export to env vars .i.e |
@Genysys This was before |
Closing as a wontfix since there are no .env crates that support this currently, will revisit if one pops up, otherwise we are just going to document this behavior. |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
9b0575e 2022-08-04T00:10:43.515642Z
What command(s) is the bug in?
forge script
Operating System
macOS (Intel)
Describe the bug
I have a
.env
file in the root of my project, and it containsRPC_URL=XXX
.When running
vm.createSelectFork(vm.envString("RPC_URL"));
in a script, I get the error:I expected that this would work. Is this not the expected use?
Of course before Foundry shipped dotenv support, I was using my solenv library and it worked fine.
Thanks!
The text was updated successfully, but these errors were encountered: