diff --git a/generateDataAndRun.sh b/generateDataAndRun.sh index ce78664..8407cce 100755 --- a/generateDataAndRun.sh +++ b/generateDataAndRun.sh @@ -21,18 +21,18 @@ fi # Enable seting the version of NodeJS # Install NVM if it is not install in CI +export NVM_DIR=$HOME/.nvm +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion + if [[ $CI == "true" ]] && ! [ -x "$(command -v nvm)" ] then curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash export NVM_DIR="$HOME/.config/nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -else - export NVM_DIR=$HOME/.nvm fi -source $NVM_DIR/nvm.sh; - ########## # Regenerate test data and verify against schema ##########