From 9338719ba1539a709adddae400d7dc9dedf8a728 Mon Sep 17 00:00:00 2001 From: Ian Ker-Seymer Date: Tue, 14 Apr 2015 17:22:26 -0600 Subject: [PATCH] Add Arch Linux configuration for node module --- modules/node/init.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/node/init.zsh b/modules/node/init.zsh index 6d600789..04618d3a 100644 --- a/modules/node/init.zsh +++ b/modules/node/init.zsh @@ -9,11 +9,15 @@ # Load manually installed NVM into the shell session. if [[ -s "$HOME/.nvm/nvm.sh" ]]; then 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 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. elif (( ! $+commands[node] )); then return 1