1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 17:28:01 +00:00

Fix broken source commands in node module

Placing `--no-use` inside the quoted string results in source
attempting to load a file which literally ends with ` --no-use`
instead of passing --no-use as an argument.
This commit is contained in:
Ehren Kret 2021-05-24 09:04:19 -05:00 committed by Indrajit Raychaudhuri
parent 7052e2a002
commit 53033bc5d9

View File

@ -24,13 +24,13 @@ elif (( $+commands[nodenv] )); then
# Load manually installed NVM into the shell session. # Load manually installed NVM into the shell session.
elif [[ -s ${local_nvm::=$local_nvm_paths[1]} ]]; then elif [[ -s ${local_nvm::=$local_nvm_paths[1]} ]]; then
source "$local_nvm --no-use" source "$local_nvm" --no-use
unset local_nvm{,_paths} unset local_nvm{,_paths}
# Load package manager installed NVM into the shell session. # Load package manager installed NVM into the shell session.
elif (( $+commands[brew] )) \ elif (( $+commands[brew] )) \
&& [[ -d "${nvm_prefix::="$(brew --prefix nvm 2> /dev/null)"}" ]]; then && [[ -d "${nvm_prefix::="$(brew --prefix nvm 2> /dev/null)"}" ]]; then
source "$nvm_prefix/nvm.sh --no-use" source "$nvm_prefix/nvm.sh" --no-use
unset nvm_prefix unset nvm_prefix
# Return if requirements are not found. # Return if requirements are not found.