fix: setup.sh initializes git repo if none exists
This commit is contained in:
7
setup.sh
7
setup.sh
@@ -45,6 +45,13 @@ fi
|
|||||||
|
|
||||||
echo "[setup] Harness source: $HARNESS_SRC"
|
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/ ---
|
# --- Scaffold .loop/ ---
|
||||||
PROJECT_ROOT="$(pwd)"
|
PROJECT_ROOT="$(pwd)"
|
||||||
LOOP_DIR="$PROJECT_ROOT/.loop"
|
LOOP_DIR="$PROJECT_ROOT/.loop"
|
||||||
|
|||||||
Reference in New Issue
Block a user