Quellcode durchsuchen

Auto-install brainstorm server dependencies on first run

start-server.sh now runs npm install if node_modules is missing.
Fixes broken server when superpowers is installed as a plugin (node_modules
are in .gitignore and not included in the clone).
Jesse Vincent vor 6 Monaten
Ursprung
Commit
5e2a89e985
1 geänderte Dateien mit 5 neuen und 0 gelöschten Zeilen
  1. 5 0
      skills/brainstorming/scripts/start-server.sh

+ 5 - 0
skills/brainstorming/scripts/start-server.sh

@@ -88,6 +88,11 @@ fi
 
 cd "$SCRIPT_DIR"
 
+# Auto-install dependencies if missing
+if [[ ! -d "node_modules" ]]; then
+  npm install --production --no-fund --no-audit 2>&1 | tail -1 >&2
+fi
+
 # Foreground mode for environments that reap detached/background processes.
 if [[ "$FOREGROUND" == "true" ]]; then
   echo "$$" > "$PID_FILE"