-
Notifications
You must be signed in to change notification settings - Fork 47
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
no substition on cases where the variable does not exist #100
Comments
I'm still a little confused by your issue. Basically, what is the behavior you're experiencing, what is your issue with it, and what is the behavior you expect? |
So right now the issue is that there is a substitution happening and, since But, let's pretend you have never heard of shell variable magic, The real-life issue is, that we encountered was a password, that contained at some place a like So the solution for me was to define this variable like But this was far from intuitive, especially I was wondering why the substitution logic is not smart enough to realize there is no variable called I hope it brings some clarity on the context and the issue at hand. |
I am understanding much better now. The solution to me is to have it never substitute when it is @allan2 as the maintainer, i'd like to hear your input on what you believe the best solution is. I also do not know this repository enough internally to know whether or not this functionality is explicit or part of a library we use. |
Hi, knowing this is a fork from dotenv, I went to look at their repo and in the README.md, there is a clear documentation about Variable substitution To me this is just a matter of documentation. |
Thanks for opening this. Substitution is now mentioned in the root README. Sorry that it was unclear before. |
given
an .env file with 3 entries, where 2 are using a
$
sign in their value.The
$
does not reference any valid env variable.e.g.:
expectations
KEY2
should show the value$NOKEY
, so without the regular env variable substitution.KEY3
where the value should be$NOKEY+valueU
I would argue that behavior is sound because there is no env variable named
NOKEY
, hence there is no substitution happening.Note: But I have to acknowledge that bash and other shells behave the way it is currently implemented.
The text was updated successfully, but these errors were encountered: