-
Notifications
You must be signed in to change notification settings - Fork 696
Add automatic ".env" compatibility #438
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
Conversation
This introduces a few issues with backward-compatibility:
|
Thanks for checking!
Does this answer your questions? |
I have been using this fork for the last week now without issues, for what it's worth. |
Added back |
I did not mean to close this PR. I just rebased it on master, to keep the PR up to date. I think one approach here could be to merge it and get it out to people. Then we could add improvements as we go, if needed. I've been using this code successfully since January 3, 2019, so that could vouch for it working. |
|
@aude I added some minimal testing, which probably needs to be fixed. Having it work on your machine is not nearly sufficient to make sure it doesn't break other people's workflows as direnv is used in many different contexts. Please also amend the documentation to advertise the fact that direnv is now also looking for .env files. |
Thanks for taking a look. I'll take a look at the tests and add documentation. |
a4e430c
to
6d567f3
Compare
Sorry for letting you guys down here. I lost motivation some months ago, I'm currently not motivated to finish the PR. Hoping that changes, can't promise anything though. |
|
Ping, any progress here ? |
@varac do you want to pick this up? |
Is this likely to be merged? I'd like to see this functionality included. Great work with direnv, thank you. |
It depends on somebody stepping up and fixing the PR. |
Understood. I'd like to have a go but have very little time, knowledge of bash and experience with go, so I'm not best equipped 🤓. Thanks again for the package. |
I created a PR as continuation of this: #845 It should be ready to review, any feedback is welcome. |
Released in v2.30.1! |
This is work towards using
.env
if there is no.envrc
(#284).I love what direnv does, and would really like to use it more 😄 Having automatic "fallback" to
.env
would remove a lot of friction for me. I figured the best way to achieve that would be to help implement it.The code is WIP now. It works, but might be a bit wrong/incoherent. I would appreciate any feedback, I'm quite new to Go.
.env
files are not loaded "layered" now, same as.envrc
. I would personally like.env
loading to work by default likesource_up
. Thoughts?DIRENV_DIR
toDIRENV_FILE
, to keep track of the RC file used. Is that breaking anything?type
attribute on theRC
object instead. Thoughts?.env
loading. I'd like to add some, but could take some advice what should be tested.