fix: load environment variables early for runners.conf validation

This commit is contained in:
S
2026-03-02 09:21:45 -05:00
parent 4954e04825
commit c5190020de

View File

@@ -87,6 +87,11 @@ if [[ ! -f "${SCRIPT_DIR}/.env" ]]; then
# Can't continue without .env — run remaining checks but they'll mostly fail # Can't continue without .env — run remaining checks but they'll mostly fail
fi 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 # 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 check 5b "runners.conf INI format validation" check_runners_ini_format
fi 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 # Check 6: Required .env vars
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------