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.
main
Fernando H-T Goldáraz 8 years ago committed by Kaleb Elwert
parent 2794f95d3e
commit 42d9b78907

@ -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.

Loading…
Cancel
Save