mirror of
https://github.com/obra/superpowers.git
synced 2026-04-21 00:49:06 +08:00
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).
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user