Skip to content

Commit

Permalink
Merge branch 'master' into remove-fancy-bullets
Browse files Browse the repository at this point in the history
  • Loading branch information
Secrus authored Nov 13, 2023
2 parents 395c8ef + 8d7e55e commit dbc5716
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/poetry/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,13 @@ def get(cls) -> Shell:

def activate(self, env: VirtualEnv) -> int | None:
activate_script = self._get_activate_script()
bin_dir = "Scripts" if WINDOWS else "bin"
if WINDOWS:
bin_path = env.path / "Scripts"
# Python innstalled via msys2 on Windows might produce a POSIX-like venv
# See https://github.com/python-poetry/poetry/issues/8638
bin_dir = "Scripts" if bin_path.exists() else "bin"
else:
bin_dir = "bin"
activate_path = env.path / bin_dir / activate_script

# mypy requires using sys.platform instead of WINDOWS constant
Expand Down

0 comments on commit dbc5716

Please sign in to comment.