[object Object]

← back to Allnewsdaily

wire-push: robust node resolution for launchd; add wire-push launchd plist (load is Steve-gated)

f1da61c70938670d82b664ac85cfea4fce375af2 · 2026-09-09 11:32:19 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177CKXFpA1rVH3Sk24fgRZ9

Files touched

Diff

commit f1da61c70938670d82b664ac85cfea4fce375af2
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Sep 9 11:32:19 2026 -0700

    wire-push: robust node resolution for launchd; add wire-push launchd plist (load is Steve-gated)
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0177CKXFpA1rVH3Sk24fgRZ9
---
 scripts/push-wire.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/scripts/push-wire.sh b/scripts/push-wire.sh
index 1fa20ed..746a184 100755
--- a/scripts/push-wire.sh
+++ b/scripts/push-wire.sh
@@ -6,10 +6,17 @@ cd "$(dirname "$0")/.."
 PROD="${PROD_HOST:-root@45.61.58.125}"
 REMOTE="/root/Projects/allnewsdaily/data/wire.json"
 
-node scripts/build-wire.js || { echo "[push-wire] build failed, not pushing"; exit 1; }
+# Resolve node robustly (launchd has a minimal PATH).
+NODE="$(command -v node || true)"
+for cand in /opt/homebrew/bin/node /usr/local/bin/node /usr/bin/node; do
+  [ -z "$NODE" ] && [ -x "$cand" ] && NODE="$cand"
+done
+[ -n "$NODE" ] || { echo "[push-wire] node not found"; exit 3; }
+
+"$NODE" scripts/build-wire.js || { echo "[push-wire] build failed, not pushing"; exit 1; }
 
 # only push a non-empty, valid file
-node -e "const w=require('./data/wire.json'); if(!w.columns||!w.columns.length){process.exit(2)}" || { echo "[push-wire] wire.json invalid, not pushing"; exit 2; }
+"$NODE" -e "const w=require('./data/wire.json'); if(!w.columns||!w.columns.length){process.exit(2)}" || { echo "[push-wire] wire.json invalid, not pushing"; exit 2; }
 
 rsync -az -e "ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new" data/wire.json "$PROD:$REMOTE"
 echo "[push-wire] pushed $(date -u +%FT%TZ) → $PROD:$REMOTE"

← 9829705 Add prod static-wire mode: WIRE_STATIC=1 serves pre-built da  ·  back to Allnewsdaily  ·  feed balance: cap 3 items per outlet per column so no single 996668c →