diff --git a/plugins/nvm/nvm.plugin.zsh b/plugins/nvm/nvm.plugin.zsh index 9dde3a26..4bab8e9d 100644 --- a/plugins/nvm/nvm.plugin.zsh +++ b/plugins/nvm/nvm.plugin.zsh @@ -1,5 +1,8 @@ # Set NVM_DIR if it isn't already defined [[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm" -# Load nvm if it exists -[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" +# Try to load nvm only if command not already available +if ! type "nvm" &> /dev/null; then + # Load nvm if it exists + [[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" +fi