From 39ef1320b00f58d62d666ccf3f6561fa382389fc Mon Sep 17 00:00:00 2001 From: pyr0ball Date: Mon, 25 May 2026 19:15:33 -0700 Subject: [PATCH] feat(manage): source .env before starting uvicorn Enables TURNSTONE_MULTI_AGENT_DIAGNOSE and other env vars set in .env to reach the running process without manual export. Variables already set in the caller's environment take precedence. --- manage.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/manage.sh b/manage.sh index 19a5b96..ec74fe4 100755 --- a/manage.sh +++ b/manage.sh @@ -38,6 +38,15 @@ PATTERN_DIR="${TURNSTONE_PATTERNS:-$([[ -d /devl/turnstone-cluster/patterns ]] & CONDA_BASE="${CONDA_BASE:-/devl/miniconda3}" PYTHON="${CONDA_BASE}/envs/cf/bin/python" +# Source .env if present — loads TURNSTONE_MULTI_AGENT_DIAGNOSE, GPU_SERVER_URL, etc. +# Variables already set in the environment take precedence (set -a / set +a scoping). +if [[ -f "${SCRIPT_DIR}/.env" ]]; then + set -a + # shellcheck source=/dev/null + source "${SCRIPT_DIR}/.env" + set +a +fi + # ── Helpers ─────────────────────────────────────────────────────────────────── _is_alive() {