From f3f5c080e2d6d29c7c63f23c46be49064582ebbe Mon Sep 17 00:00:00 2001 From: LPJon <46533576+LPJon@users.noreply.github.com> Date: Thu, 31 Aug 2023 04:26:53 -0500 Subject: [PATCH] Update install_terminal Changed NVM support to use whatever is /usr/bin/node whether the RPM package or the symbolic link to the desired node version. This makes the node version is dependent on the symbolic link or the RPM package location. When NVM is used though this script, it will use the RPM or create a symbolic link to the set version of Node.JS. --- install_terminal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_terminal b/install_terminal index 4c0d484..5b4b497 100644 --- a/install_terminal +++ b/install_terminal @@ -44,10 +44,10 @@ elif [ "$usenvm" == "y" ]; then [ -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 nvm install $nodeversion - nvm use $nodeversion if [ "$(getsystemnodeversion)" != "v$nodeversion" ]; then ln -sf /root/.nvm/versions/node/v"$nodeversion"/bin/node /usr/bin/node fi + nvm use system fi if [ ! -e "$HOME/.nvm" ]; then yum -y install curl @@ -56,8 +56,8 @@ elif [ "$usenvm" == "y" ]; then [ -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 nvm install "$nodeversion" - nvm use "$nodeversion" ln -sf /root/.nvm/versions/node/v"$nodeversion"/bin/node /usr/bin/node + nvm use system fi fi