failsafe exit if node is installed
This commit is contained in:
parent
f2a8c2fc49
commit
2309008c5f
|
@ -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=""
|
||||
|
|
Loading…
Reference in New Issue