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"