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

Manual reloading assumes default direnv_layout_dir #400

Closed
gmacon opened this issue Oct 30, 2023 · 0 comments · Fixed by #401
Closed

Manual reloading assumes default direnv_layout_dir #400

gmacon opened this issue Oct 30, 2023 · 0 comments · Fixed by #401

Comments

@gmacon
Copy link

gmacon commented Oct 30, 2023

The nix-direnv-reload script that's created when nix_direnv_manual_reload is enabled assumes that the direnv_layout_dir function is the default one provided by direnv that puts the layout dir at $PWD/.direnv. The symptom of this was

touch: cannot touch '/home/gmacon/.cache/direnv/layouts/.direnv/nix-profile-*.rc': No such file or directory
touch: cannot touch '/home/gmacon/.cache/direnv/layouts/.direnv/flake-profile-*.rc': No such file or directory

in the output and it not loading the environment correctly. Looking at the code, I think that's because it's also calling direnv exec "/home/gmacon/.cache/direnv/layouts" true and that directory naturally contains no .envrc to load.

ETA: for the immediate future, I've removed my custom direnv_layout_dir to get unblocked, but I'll try to implement a fix some evening this week, too.

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

Successfully merging a pull request may close this issue.

1 participant