fix: setup.sh initializes git repo if none exists

This commit is contained in:
2026-03-27 15:47:43 -04:00
parent 6b13fc3d38
commit a9af753a2e

View File

@@ -45,6 +45,13 @@ fi
echo "[setup] Harness source: $HARNESS_SRC"
# --- Ensure git repo exists ---
if ! git rev-parse --git-dir &>/dev/null; then
echo "[setup] No git repo found. Initializing..."
git init
git checkout -b main 2>/dev/null || true
fi
# --- Scaffold .loop/ ---
PROJECT_ROOT="$(pwd)"
LOOP_DIR="$PROJECT_ROOT/.loop"