mv .envrc → .envrc.example#178
Closed
toastal wants to merge 1 commit intoNixOS:masterfrom
Closed
Conversation
It isn’t a good idea to make a personal configuration file hard to work with since it’s being tracked by the repository. This will a) trigger ``direnv`` to fire off its allow script before a use gets a chance to see what arbitrary code is about to be executed on their behalf & b) make making modifications more difficult as it would be easy to accidentally commit those modifications *or* requires addings all sorts of unnecessary extra configuration to allow a safe place to put in custom environment variables. The simple solution is to just leave an example for those that want it.
Member
|
We already had this discussion and the overall sentiment seems to be that the way it's currently handle is fine. #118 (comment) |
Member
|
We discussed this in the team after you brought it up last time, and remain unconvinced that your proposed change is a net positive on the intended developer experience. |
Contributor
Author
|
I couldn’t re-find the discussion nor did I see the follow-up conversation. Following the link, there never was a follow-up conversation posted. |
Member
|
Yes, we forgot to do that unfortunately. |
Member
|
I'd be okay with something like this though: if [[ -f .envrc.local ]]; then
source .envrc.local
else
use_nix
fiThis will allow you to customise the behavior without changing the default. |
Member
|
You wouldn't: direnv/direnv#348 (comment) |
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.
It isn’t a good idea to make a personal configuration file hard to work with since it’s being tracked by the repository. This will a) trigger
direnvto fire off its allow script before a use gets a chance to see what arbitrary code is about to be executed on their behalf & b) make making modifications more difficult as it would be easy to accidentally commit those modifications or requires addings all sorts of unnecessary extra configuration to allow a safe place to put in custom environment variables.The simple solution is to just leave an example for those that want it.