Skip to content
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

Possible to automatically allow? #766

Closed
introom opened this issue Feb 16, 2021 · 5 comments
Closed

Possible to automatically allow? #766

introom opened this issue Feb 16, 2021 · 5 comments
Labels

Comments

@introom
Copy link

introom commented Feb 16, 2021

After editting .envrc, I have to manually direnv allow.

While automatically allowing envrc might expose a security hole, I wonder if it is possible to automatically allow envrc ?

@zimbatm
Copy link
Member

zimbatm commented Feb 16, 2021

direnv edit does something like that. First, you have to make sure that the EDITOR environment variable is set. Eg: export EDITOR=vim. Set that in your ~/.profile or other startup location. Then instead of using vim .envrc, use direnv edit. Once the editor exits, and IFF the file mtime has changed, it assumes that you trust the content and will automatically allow it.

@introom
Copy link
Author

introom commented Feb 16, 2021

It would be more preferable to have a variable to explicitly allow that behavior.

@nandalopes
Copy link

You may add the path to the direnv.toml config, see man direnv.toml

@introom
Copy link
Author

introom commented Feb 19, 2021

Thanks for that.

@introom introom closed this as completed Feb 19, 2021
@guettli
Copy link

guettli commented Jun 7, 2023

Related question: https://github.com/orgs/direnv/discussions/1115

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants