-
Notifications
You must be signed in to change notification settings - Fork 393
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
Which takes precedence, the local .env or the actual environment variables? #59
Comments
A good question, let me try and figure out
|
~/Projects/dotenvtest ruby test.rb
xTvDqw
foo$bar
123value
~/Projects/dotenvtest BAR=other ruby test.rb
xTvDqw
foo$bar
123other
~/Projects/dotenvtest vim test.go
~/Projects/dotenvtest go run test.go
xTvDqw7
foo\
123value
~/Projects/dotenvtest BAR=other go run test.go
xTvDqw7
foo\
123value Environment variables should take preference (but don't), though there will probably be some edge cases in load vs overload. Guess there's a 1.3.1 coming soon 😄 |
Had this discussion with a coworker and he told me the same. Each time a .env is loaded the prior takes precedence. The rationale being
|
Thanks for looking into that and I look forward to the new version |
poke => v1.3.1 with precedence fixes? |
Hey sorry - hell of a hectic week as a sole startup founder and haven't been able to jump straight on this. Will try today or tomorrow. PRs always welcome if you need to hurry it along more than that. |
I starting digging into the code and it looked as if everything was in order. I ran a test to be sure and it seems to me that all is working as it should:
|
Here are some suggestions for updating the REAME: #60 |
Just curious, for edge cases.
The text was updated successfully, but these errors were encountered: