Private
Public Access
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>
This commit is contained in:
1 parent
78611c0eae
commit
62702e13e3
1 file changed
+4
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user