mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-01-30 09:47:14 +08:00
Add ZSH_NVM_NO_LOAD option
If ZSH_NVM_NO_LOAD is set to true then zsh-nvm won't actually do anything after setting up environment variables and functions. This is usefull for unit tests and debugging.
This commit is contained in:
parent
c7ee42d5c5
commit
8367ab3120
@ -144,6 +144,9 @@ _zsh_nvm_revert() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Don't init anything if this is true (debug/testing only)
|
||||||
|
if [[ "$ZSH_NVM_NO_LOAD" != true ]]; then
|
||||||
|
|
||||||
# Install nvm if it isn't already installed
|
# Install nvm if it isn't already installed
|
||||||
[[ ! -f "$NVM_DIR/nvm.sh" ]] && _zsh_nvm_install
|
[[ ! -f "$NVM_DIR/nvm.sh" ]] && _zsh_nvm_install
|
||||||
|
|
||||||
@ -153,3 +156,5 @@ if [[ -f "$NVM_DIR/nvm.sh" ]]; then
|
|||||||
# Load it
|
# Load it
|
||||||
[[ "$NVM_LAZY_LOAD" == true ]] && _zsh_nvm_lazy_load || _zsh_nvm_load
|
[[ "$NVM_LAZY_LOAD" == true ]] && _zsh_nvm_lazy_load || _zsh_nvm_load
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user