From c5190020de47e750fd0e75d6dc4e9d7499a0fa1a Mon Sep 17 00:00:00 2001 From: S Date: Mon, 2 Mar 2026 09:21:45 -0500 Subject: [PATCH] fix: load environment variables early for runners.conf validation --- preflight.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/preflight.sh b/preflight.sh index 9f908f9..9b477cc 100755 --- a/preflight.sh +++ b/preflight.sh @@ -87,6 +87,11 @@ if [[ ! -f "${SCRIPT_DIR}/.env" ]]; then # Can't continue without .env — run remaining checks but they'll mostly fail fi +# Load env early — needed by check 5b (runners.conf validates repos against REPO_NAMES) +if [[ -f "${SCRIPT_DIR}/.env" ]]; then + load_env +fi + # --------------------------------------------------------------------------- # Check 5: runners.conf exists # --------------------------------------------------------------------------- @@ -249,13 +254,6 @@ if [[ -f "${SCRIPT_DIR}/runners.conf" ]]; then check 5b "runners.conf INI format validation" check_runners_ini_format fi -# --------------------------------------------------------------------------- -# Load env for remaining checks (may fail if .env missing) -# --------------------------------------------------------------------------- -if [[ -f "${SCRIPT_DIR}/.env" ]]; then - load_env -fi - # --------------------------------------------------------------------------- # Check 6: Required .env vars # ---------------------------------------------------------------------------