Skip to content
Myr

Fix nvm_install_node function in install.sh script to not override the actual NODE_VERSION value

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ahmad Magdy · committed by Ahmad Magdy · parent a57fe84 · Browse files · 1 file+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−8 removed

  • other:+8 added−8 removed

1 file+8 added−8 removed

modified:install.sh+8 added-8 removed
138 unmodified lines
139#140# Automatically install Node.js141#142nvm_install_node() {143 local NODE_VERSION144 NODE_VERSION="$(nvm_node_version)"143 local NODE_VERSION_LOCAL144 NODE_VERSION_LOCAL="$(nvm_node_version)"145146 if [ -z "$NODE_VERSION" ]; then146 if [ -z "$NODE_VERSION_LOCAL" ]; then147 return 0148 fi149150 echo "=> Installing Node.js version $NODE_VERSION"151 nvm install "$NODE_VERSION"150 echo "=> Installing Node.js version $NODE_VERSION_LOCAL"151 nvm install "$NODE_VERSION_LOCAL"152 local CURRENT_NVM_NODE153154 CURRENT_NVM_NODE="$(nvm_version current)"155 if [ "$(nvm_version "$NODE_VERSION")" == "$CURRENT_NVM_NODE" ]; then156 echo "=> Node.js version $NODE_VERSION has been successfully installed"155 if [ "$(nvm_version "$NODE_VERSION_LOCAL")" == "$CURRENT_NVM_NODE" ]; then156 echo "=> Node.js version $NODE_VERSION_LOCAL has been successfully installed"157 else158 echo >&2 "Failed to install Node.js $NODE_VERSION"158 echo >&2 "Failed to install Node.js $NODE_VERSION_LOCAL"159 fi160}161162install_nvm_as_script() {
233 unmodified lines