From 04c857654aa1f253632af2b15229f0fe60ae13ed Mon Sep 17 00:00:00 2001 From: Kit OC5 Date: Thu, 24 Sep 2026 02:38:25 -0400 Subject: [PATCH] rerun_ci.sh: find wg-q in the invoking user home under sudo Under sudo ~ is /root, so the final run listing failed (windy-inbox #14). Co-Authored-By: Claude Opus 5.5 --- scripts/rerun_ci.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/rerun_ci.sh b/scripts/rerun_ci.sh index 8b4ee36..eb7432d 100755 --- a/scripts/rerun_ci.sh +++ b/scripts/rerun_ci.sh @@ -16,6 +16,8 @@ # itself, so Windy Git is never left behind GitHub. set -euo pipefail repo="${1:?repo}"; branch="${2:?branch}"; want="${3:?sha prefix}" +# wg-q lives in the INVOKING user's ~/bin; under sudo, ~ is /root. +WGQ="${WGQ:-$(getent passwd "${SUDO_USER:-$USER}" | cut -d: -f6)/bin/wg-q}" # Gitea stores repositories LOWERCASED on disk (WindyCloud -> windycloud.git). G="sudo docker exec -u git windy-git-gitea-1 git -C /data/git/repositories/windyadmin/${repo,,}.git" @@ -43,7 +45,7 @@ until [ "$(systemctl show windygit-sync -p ExecMainStartTimestampMonotonic --val done echo "restored by sync: ${branch} = ${head:0:7}" sleep 5 -~/bin/wg-q <