Compare commits

..
Author SHA1 Message Date
ksmithandClaude Sonnet 5 62702e13e3 Detect and recreate a half-created venv, not just a missing one
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 <noreply@anthropic.com>
2026-10-31 08:52:36 -06:00
+4
View File
@@ -104,6 +104,10 @@ chown -R "$EVECTION_USER:$EVECTION_USER" "$APP_DIR"
# --- 3. Virtualenv + install --------------------------------------------- # --- 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 if [ ! -d "$VENV_DIR" ]; then
echo "==> Creating virtualenv at $VENV_DIR" echo "==> Creating virtualenv at $VENV_DIR"
sudo -u "$EVECTION_USER" -H "$PYTHON_BIN" -m venv "$VENV_DIR" sudo -u "$EVECTION_USER" -H "$PYTHON_BIN" -m venv "$VENV_DIR"