-
Notifications
You must be signed in to change notification settings - Fork 506
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
How should I store values with dollar signs ($)...(escaped, quoted)? #214
Comments
The Ruby implementation of dotenv follows follows bash as closely as possible, which means $ needs to be escaped unless it is in single quotes. These are all valid:
The value in ruby will be unescaped. |
Thanks! That's what I was looking for. |
This isn't working for me. The name of the environment variable is picked up but its value is an empty string. |
nvm I was accidentally using dot_env? Why is this package allowed to exist? |
I have a .env file that is being parsed by both PHP and node Node implementations.
I'm asking here in the canonical repo, as this is more of a best practice question.
I have values that have literal dollar signs in them:
Should I be quoting that, or escaping the dollar?
If I escape the dollar in my .env file, will I need to unescape it when i use it?
So I guess it boils down to - should I be escaping the dollar in my .env file, or when I get the value with PHP or Node or whatever?
The text was updated successfully, but these errors were encountered: