|
|
@ -10,10 +10,14 @@
|
|
|
|
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
|
|
|
|
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
|
|
|
|
source "$HOME/.nvm/nvm.sh"
|
|
|
|
source "$HOME/.nvm/nvm.sh"
|
|
|
|
|
|
|
|
|
|
|
|
# Load package manager installed NVM into the shell session.
|
|
|
|
# OSX: Homebrew
|
|
|
|
elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then
|
|
|
|
elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then
|
|
|
|
source $(brew --prefix nvm)/nvm.sh
|
|
|
|
source $(brew --prefix nvm)/nvm.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Arch Linux: Pacman
|
|
|
|
|
|
|
|
elif [[ -s "/usr/share/nvm/nvm.sh" ]]; then
|
|
|
|
|
|
|
|
source "/usr/share/nvm/nvm.sh"
|
|
|
|
|
|
|
|
|
|
|
|
# Return if requirements are not found.
|
|
|
|
# Return if requirements are not found.
|
|
|
|
elif (( ! $+commands[node] )); then
|
|
|
|
elif (( ! $+commands[node] )); then
|
|
|
|
return 1
|
|
|
|
return 1
|
|
|
|