From 62702e13e328b96d76c6fc06f3a17996dc200121 Mon Sep 17 00:00:00 2001 From: Keith Smith Date: Sat, 31 Oct 2026 08:52:36 -0600 Subject: [PATCH] Detect and recreate a half-created venv, not just a missing one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The idempotency check only looked for the venv directory's existence, so a venv left behind by an earlier failed run (e.g. missing ensurepip, as just hit) — present but with no bin/pip — made every later re-run skip venv creation entirely and then fail on a pip that was never created. Check for bin/pip specifically and wipe+recreate if it's missing. Co-Authored-By: Claude Sonnet 5 --- scripts/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index 6496169..39d2240 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -104,6 +104,10 @@ chown -R "$EVECTION_USER:$EVECTION_USER" "$APP_DIR" # --- 3. Virtualenv + install --------------------------------------------- +if [ -d "$VENV_DIR" ] && [ ! -x "$VENV_DIR/bin/pip" ]; then + echo "==> $VENV_DIR exists but looks incomplete (no bin/pip) — recreating it" + rm -rf "$VENV_DIR" +fi if [ ! -d "$VENV_DIR" ]; then echo "==> Creating virtualenv at $VENV_DIR" sudo -u "$EVECTION_USER" -H "$PYTHON_BIN" -m venv "$VENV_DIR"