From a443dd04d30072dec2ee9b5fa161842d22ad7307 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sat, 12 May 2018 14:37:54 -0600 Subject: [PATCH] fix for unbound var --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e60adbe..6a47387 100644 --- a/install.sh +++ b/install.sh @@ -234,7 +234,7 @@ if [ -z "${NODEJS_VER:-}" ]; then fi fi -if [ -n "$NODEJS_VER" ]; then +if [ -n "${NODEJS_VER:-}" ]; then NODEJS_VERT=$(echo ${NODEJS_VER} | cut -c 2- | cut -d '.' -f1) if [ $NODEJS_VERT -ge 1 ] && [ $NODEJS_VERT -lt 4 ] @@ -245,7 +245,7 @@ if [ -n "$NODEJS_VER" ]; then fi fi -if [ -z "$NODEJS_VER" ]; then +if [ -z "${NODEJS_VER:-}" ]; then if [ -n "$(type -p curl)" ]; then NODEJS_VER=$(curl -fsL "$NODEJS_BASE_URL/dist/index.tab" | head -n 2 | tail -1 | cut -f 1) \ || echo 'error automatically determining current node.js version'