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
direnv: error .envrc or .env file not found #916
Comments
Unfortunately, I had to make that feature optional as it was breaking back-compat for most users. There is a new config option that you can use to toggle that feature back on: https://direnv.net/man/direnv.toml.1.html#codeloaddotenvcode [global]
load_dotenv = true |
Also does the trick, not even putting the configuration inside a |
The configuration should be added to |
I also spend some time today trying to figure out why direnv had stopped working for me. Creating a config file as described above with the load_dotenv value reenabled the previous functionality (for me at least). |
I think this ought to be made more prominent in the docs or even the homepage. I'm willing to bet most Mac users are going to run into this and some may not make it so far as this issue before giving up. I almost did |
This is a very frustrating issue.
There's zero indication that a default value changed behind the scenes, for those of us that come to rely on this tool. |
Yeah, sorry about the back-and-forth. I made a mistake. The point on the error message is also a good one if anybody wants to send a PR? |
This should've been a major version bump. |
This also broke for |
Direnv added a setting to opt in to loading .env files alongside .envrc files, which caused a regression in behavior for those who were relying on this functionality. Since some projects still use .env to manage the environment, opt in to the previous behavior. direnv/direnv#916
Thankfully found this issue and was able to fix my own environment by adding it to |
Follow-up on direnv#845 and direnv#911: resolves direnv#916 This commit simply updates the error messages and documentation to more accurately reflect the current opt-in configurable handling of `.env` files.
Perfect, thanks a lot :) Just waiting on the CI to get green and then it can be merged. |
@doctaphred Much appreciated, I think this will be a great solution to the complaint I raised earlier. I don't read/write Go either, so I can't comment on the PR, but the language looks perfect. |
it was |
Typo, original message fixed. |
Describe the bug
Since the latest upgrade direnv won't load my
.env
files anymore.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I was expecting my
.env
files to be loadedEnvironment
Additional context
The file is there but it won't load. Someone said I now need to use fish syntax in my .env file which for shared project configuration in a multi-user repository just isn't feasible. direnv ends up being completely unusable unfortunately. Even if I move the changes to a
.envrc
they aren't loaded.The text was updated successfully, but these errors were encountered: