Closed Eliot00 closed 4 months ago
What makes you think this is specific to envrc.el
? Does nix develop
work in that directory in the terminal? What's the global value of (getenv "PATH")
and exec-path
? Probably your .envrc
assumes that git
is on the path of the parent shell, and that isn't the case, but that's not the fault of envrc.el
.
I notice you're using a snippet from StackOverflow that I published years ago to set exec-path
from your shell, but you should consider using my exec-path-from-shell
package for that instead. It fixes various potential problems with the snippet, plus if you use it you can enable exec-path-from-shell-debug
to get more info about how it is changing your Emacs environment.
Does
nix develop
work in that directory in the terminal?
Yes, and if I remove .git
, envrc.el
can work with direnv
.
Finally, exec-path-from-shell
solved my problem, thanks.
Great!
I installed direnv and git using nix-darwin and home-manager. By setting PATH, envrc found direnv. However, if my .envrc directories use git, an error occurs:
my config: