diff --git a/scripts/install/python.sh b/scripts/install/python.sh index 926c5778d3..703219b37c 100755 --- a/scripts/install/python.sh +++ b/scripts/install/python.sh @@ -1,6 +1,14 @@ #!/usr/bin/env bash set -euo pipefail +# 🔁 Reload env to pick up newly created venv +if [[ -n "${VENV:-}" && -x "${VENV}/bin/python" && "${PYTHON:-}" != "${VENV}/bin/python" ]]; then + unset INFINITO_ENV_LOADED + unset INFINITO_ENV_PYTHON_LOADED + # shellcheck source=scripts/meta/env/all.sh + source "${ENV_SH:-scripts/meta/env/all.sh}" +fi + : "${PYTHON:?PYTHON not set}" EXTRA="${1:-}"