Browse Source

Extra node check

Bob Mottram 7 years ago
parent
commit
d05ed7ef30
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      src/freedombone-utils-nodejs

+ 4
- 1
src/freedombone-utils-nodejs View File

@@ -165,7 +165,10 @@ function nodejs_upgrade {
165 165
     fi
166 166
     if grep -q "node_8.x" /etc/apt/sources.list.d/nodesource.list; then
167 167
         if [ -f /usr/local/bin/node ]; then
168
-            return
168
+            CURR_NODE_VERSION=$(node --version)
169
+            if [[ "$CURR_NODE_VERSION" == "v${NODEJS_VERSION}" ]]; then
170
+                return
171
+            fi
169 172
         fi
170 173
     fi
171 174
     if [ -f /usr/local/bin/node ]; then