nixpkgs
nixpkgs copied to clipboard
direnv tries to run bash from $PATH
Describe the bug
Installing direnv without having bash in $PATH makes the shell throw errors on every command
To Reproduce Steps to reproduce the behavior:
- No
bashexecutable in$PATH nix-env -i direnv- Do anything in the shell
Expected behavior
Direnv works regardless of presence of bash in $PATH.
Notify maintainers @zimbatm
Metadata
- system:
"x86_64-linux" - host os:
Linux 4.19.84-microsoft-standard, Alpine Linux, noversion - multi-user?:
no - sandbox:
yes - version:
nix-env (Nix) 2.3.4 - channels(root):
"" - channels(akho):
"home-manager, nixpkgs-20.09pre226586.571212eb839" - nixpkgs:
/home/akho/.nix-defexpr/channels/nixpkgs
Putting
export DIRENV_BASH="$(nix eval -f ~/.nix-defexpr/channels/nixpkgs --raw bash)/bin/bash"
in .zshrc before
eval "$(direnv hook zsh)"
solves this for me.
thanks for the report!
Thank you! That was very quick.