From 2309008c5f103b5ec8424e566f34f81bc6605055 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Wed, 27 Jun 2018 10:20:10 +0000 Subject: [PATCH] failsafe exit if node is installed --- install.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install.sh b/install.sh index 9db3a02..b75e555 100644 --- a/install.sh +++ b/install.sh @@ -291,6 +291,7 @@ if [ -e "$node_install_path/bin/node" ]; then # node of some version is already installed if [ "${NODEJS_VER}" == "$($node_install_path/bin/node -v 2>/dev/null)" ]; then echo node ${NODEJS_VER} is already installed + exit 0 else echo "" echo "HEY, LISTEN:" @@ -299,6 +300,7 @@ if [ -e "$node_install_path/bin/node" ]; then echo "" echo "to reinstall as ${NODEJS_VER} please first run: rm $node_install_path/bin/node" echo "" + exit 1 fi NODEJS_VER=""