Commit 728c8e71 authored by Sascha Bratton's avatar Sascha Bratton Committed by Marc Cornellà
Browse files

nvm: load nvm script only if command doesn't already exist (#5454)

Fixes #5453.
parent 99814799
# Set NVM_DIR if it isn't already defined # Set NVM_DIR if it isn't already defined
[[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm" [[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm"
# Load nvm if it exists # Try to load nvm only if command not already available
[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh" if ! type "nvm" &> /dev/null; then
# Load nvm if it exists
[[ -f "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
fi
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment