mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-01-30 09:47:14 +08:00
Prefix to PATH rather than postfix
This commit is contained in:
parent
1f03039e85
commit
364258fef4
@ -83,13 +83,13 @@ _zsh_nvm_load() {
|
||||
_zsh_nvm_lazy_load() {
|
||||
if [[ "$NVM_CACHE_LOAD" == true ]] && [[ -s "${HOME}/.zsh_nvm_cache" ]]; then
|
||||
export NVM_CACHE_LOAD_PATH_NVM="$(cat "${HOME}/.zsh_nvm_cache")"
|
||||
|
||||
|
||||
# Add it to path if it doesn't already exist.
|
||||
if [ -d "$NVM_CACHE_LOAD_PATH_NVM" ] && [[ ":$PATH:" != *":$NVM_CACHE_LOAD_PATH_NVM:"* ]]; then
|
||||
export PATH="${PATH:+"$PATH:"}${NVM_CACHE_LOAD_PATH_NVM}"
|
||||
export PATH="${NVM_CACHE_LOAD_PATH_NVM}${PATH:+":$PATH"}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Get all global node module binaries including node
|
||||
# (only if NVM_NO_USE is off)
|
||||
local global_binaries
|
||||
|
Loading…
Reference in New Issue
Block a user