From cf1be16b5e9d83f82d019d1d21d9a1167e1cd118 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Sun, 8 Nov 2026 17:46:40 +0000 Subject: [PATCH] deploy: crawler-remote finds bun and the user bus from ssh and cron install.sh over non-interactive ssh had no mise on PATH, so BUN was empty and set -e exited silently (dev3). poll.sh under cron needs XDG_RUNTIME_DIR for systemctl --user. Co-Authored-By: Claude Opus 5.5 --- deploy/crawler-remote/install.sh | 2 ++ deploy/crawler-remote/poll.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/deploy/crawler-remote/install.sh b/deploy/crawler-remote/install.sh index 6735bc8..7bb0c26 100755 --- a/deploy/crawler-remote/install.sh +++ b/deploy/crawler-remote/install.sh @@ -25,6 +25,8 @@ while [ $# -gt 0 ]; do esac done +# A non-interactive ssh session has no mise on PATH (dev3): bun lives there. +export PATH="$HOME/.local/bin:$HOME/.local/share/mise/shims:$PATH" ROOT=$HOME/pitbot APP=$ROOT/app # systemd has no mise shims on PATH: use the real binary. diff --git a/deploy/crawler-remote/poll.sh b/deploy/crawler-remote/poll.sh index ce40e54..b1a363f 100755 --- a/deploy/crawler-remote/poll.sh +++ b/deploy/crawler-remote/poll.sh @@ -4,6 +4,8 @@ set -euo pipefail # Cron has no mise shims on PATH (bun lives there). export PATH="$HOME/.local/share/mise/shims:$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin" +# `systemctl --user` from cron needs the user bus. +export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)} APP=$HOME/pitbot/app cd "$APP" git fetch -q origin main