diff --git a/tools/with_venv.sh b/tools/with_venv.sh index 94e05c12..262b86d4 100755 --- a/tools/with_venv.sh +++ b/tools/with_venv.sh @@ -1,7 +1,8 @@ #!/bin/bash tools_path=${tools_path:-$(dirname $0)} venv_path=${venv_path:-${tools_path}} -venv_dir=${venv_name:-/../.venv} +tox_env=$(cd ${venv_path} && find ../.tox -maxdepth 1 -name "py*" | sort | tail -n1) +venv_dir=${venv_name:-${tox_env}} TOOLS=${tools_path} VENV=${venv:-${venv_path}/${venv_dir}} source ${VENV}/bin/activate && "$@"