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 <