Browse Source

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.
master
Fernando H-T Goldáraz 7 years ago committed by Kaleb Elwert
parent
commit
42d9b78907
  1. 2
      modules/node/init.zsh

2
modules/node/init.zsh

@ -16,7 +16,7 @@ elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then @@ -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