From 726577d4794b6577ad18397ea0f1d90c7aeae69b Mon Sep 17 00:00:00 2001 From: Bongani Mbigi Date: Sun, 11 Aug 2019 15:20:55 -0500 Subject: [PATCH 1/2] fixed NVM installation issue --- slay | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/slay b/slay index 1263292..861aef7 100755 --- a/slay +++ b/slay @@ -102,9 +102,15 @@ 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 + # ensures that nvm + 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 From cffb37ef462bf977cd086067840951df3ab2bb48 Mon Sep 17 00:00:00 2001 From: Bongani Mbigi Date: Sun, 11 Aug 2019 15:35:38 -0500 Subject: [PATCH 2/2] cleaning up comments --- slay | 1 - 1 file changed, 1 deletion(-) diff --git a/slay b/slay index 861aef7..00d3462 100755 --- a/slay +++ b/slay @@ -104,7 +104,6 @@ fi # ----------------------------------------------------------------------------- if ! [ -e $NVM_DIR ]; then step "Installing NVM…" - # ensures that nvm 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