Browse Source

Merge pull request #158 from return42/fix-node.clean

[fix] node.clean - ignore npm dependencies when npm is not installed
Alexandre Flament 3 years ago
parent
commit
0e3a87b73a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      manage

+ 4 - 0
manage

@@ -313,6 +313,10 @@ node.env() {
 }
 }
 
 
 node.clean() {
 node.clean() {
+    if ! required_commands npm 2>/dev/null; then
+        build_msg CLEAN "npm is not installed / ignore npm dependencies"
+        return 0
+    fi
     build_msg CLEAN "locally installed npm dependencies"
     build_msg CLEAN "locally installed npm dependencies"
     (   set -e
     (   set -e
         npm --prefix searx/static/themes/oscar run clean
         npm --prefix searx/static/themes/oscar run clean