Skip to content

Commit

Permalink
fix: resolve env path in case windows redirects installation path
Browse files Browse the repository at this point in the history
  • Loading branch information
finswimmer authored and neersighted committed Jul 13, 2022
1 parent af5e825 commit 915d307
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion install-poetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,15 @@ def make(cls, target: Path) -> "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
Expand Down

1 comment on commit 915d307

@vercel
Copy link

@vercel vercel bot commented on 915d307 Jul 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.