diff --git a/slay b/slay index 1263292..00d3462 100755 --- a/slay +++ b/slay @@ -102,9 +102,14 @@ fi # ----------------------------------------------------------------------------- # NVM # ----------------------------------------------------------------------------- -if [ -x nvm ]; then +if ! [ -e $NVM_DIR ]; then step "Installing NVM…" - curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash + touch ~/.bash_profile + curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash + # This loads nvm for the terminal session + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" print_success "NVM installed!" step "Installing latest Node…" nvm install node