1
0
Fork 0
mirror of https://github.com/python-poetry/install.python-poetry.org.git synced 2024-09-13 13:17:11 -04:00

fix: resolve env path in case windows redirects installation path

This commit is contained in:
finswimmer 2022-06-29 11:00:10 +02:00 committed by Bjorn Neergaard
parent af5e82544f
commit 915d307694

View file

@ -297,7 +297,15 @@ class VirtualEnvironment:
import venv
builder = venv.EnvBuilder(clear=True, with_pip=True, symlinks=False)
builder.ensure_directories(target)
context = builder.ensure_directories(target)
if (
WINDOWS
and hasattr(context, "env_exec_cmd")
and context.env_exe != context.env_exec_cmd
):
target = target.resolve()
builder.create(target)
except ImportError:
# fallback to using virtualenv package if venv is not available, eg: ubuntu