From 42d9b78907d256061fe641eed83accab41d4ac0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20H-T=20Gold=C3=A1raz?= Date: Tue, 2 May 2017 20:38:19 +0200 Subject: [PATCH] broken $path and $PATH if nodenv exists (#1315) This change fixes a bug where no command can be found (e.g. `ls`) due to the $path array being set to two elements, one of them with all the previous paths separated by spaces. This makes zsh break $PATH, instead of colons there are spaces, and nothing works. The idea is to have the array be set leveraging the word splitting that we usually are told to avoid by quoting. --- modules/node/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/node/init.zsh b/modules/node/init.zsh index 46ab4411..a15bace4 100644 --- a/modules/node/init.zsh +++ b/modules/node/init.zsh @@ -16,7 +16,7 @@ elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then # Load manually installed nodenv into the shell session. elif [[ -s "$HOME/.nodenv/bin/nodenv" ]]; then - path=("$HOME/.nodenv/bin $path") + path=("$HOME/.nodenv/bin" $path) eval "$(nodenv init - --no-rehash zsh)" # Load package manager installed nodenv into the shell session.