fix: load environment variables early for runners.conf validation
This commit is contained in:
12
preflight.sh
12
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
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user