Don't load .env files by default#911
Merged
zimbatm merged 1 commit intodirenv:masterfrom Mar 26, 2022
Merged
Conversation
Loading the `.env` files is a change in behaviour and broke backward-compatibility. It sounds really nice at first but it turns out that many users have .env files littered in their repository and cause a direnv reload. It's possible to turn that feature off but now they have one extra step to instruct their users. This commit inverts the behaviour and turns that feature off by default to restore back-compat. See also direnv#878.
This was referenced Mar 26, 2022
|
Great! |
Contributor
|
please also highlight in the PR body that the config key changed, it's not that visible. as both words are of the same length and the common part exceeds the differing part. so typical eye will optimize the words to be the same. |
|
I think the document misses the part where is the toml config, how to create it, and what to configure to use dotenv files back again. (Or I didn't find the info :p) Edit: Found out there https://direnv.net/man/direnv.toml.1.html |
lemald
added a commit
to mbta/skate
that referenced
this pull request
Apr 13, 2022
A recent release of direnv disabled loading of .env files by default. See direnv/direnv#911. Loading of .env files can still be enabled by changing settings, but it's simpler to provide documentation and an example that just works without further changes beyond adding your personal settings / secrets.
lemald
added a commit
to mbta/skate
that referenced
this pull request
Apr 19, 2022
* docs: update to work out-of-the-box with current direnv version A recent release of direnv disabled loading of .env files by default. See direnv/direnv#911. Loading of .env files can still be enabled by changing settings, but it's simpler to provide documentation and an example that just works without further changes beyond adding your personal settings / secrets. * docs: additional README updates
doctaphred
added a commit
to doctaphred/direnv
that referenced
this pull request
May 4, 2022
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.
zimbatm
pushed a commit
that referenced
this pull request
May 11, 2022
ivanbrennan
added a commit
to ivanbrennan/nixdots
that referenced
this pull request
Dec 23, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Loading the
.envfiles is a change in behaviour and brokebackward-compatibility. It sounds really nice at first but it turns out
that many users have .env files littered in their repository and cause a
direnv reload. It's possible to turn that feature off but now they have
one extra step to instruct their users.
This commit inverts the behaviour and turns that feature off by default
to restore back-compat.
Before:
Now (with a different key name):
See also #878.