From d05ed7ef30a058a8584af2edae9915776867d1c4 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 30 Mar 2018 11:32:41 +0100 Subject: [PATCH] Extra node check --- src/freedombone-utils-nodejs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedombone-utils-nodejs b/src/freedombone-utils-nodejs index 4ab48baf..3418519c 100755 --- a/src/freedombone-utils-nodejs +++ b/src/freedombone-utils-nodejs @@ -165,7 +165,10 @@ function nodejs_upgrade { fi if grep -q "node_8.x" /etc/apt/sources.list.d/nodesource.list; then if [ -f /usr/local/bin/node ]; then - return + CURR_NODE_VERSION=$(node --version) + if [[ "$CURR_NODE_VERSION" == "v${NODEJS_VERSION}" ]]; then + return + fi fi fi if [ -f /usr/local/bin/node ]; then