diff --git a/poetry/utils/env.py b/poetry/utils/env.py index ff78bf0161b..28999a0fbb0 100644 --- a/poetry/utils/env.py +++ b/poetry/utils/env.py @@ -22,6 +22,7 @@ from typing import Union import packaging.tags +import sysconfig import tomlkit import virtualenv @@ -879,9 +880,13 @@ class Env(object): def __init__(self, path: Path, base: Optional[Path] = None) -> None: self._is_windows = sys.platform == "win32" + self._is_mingw = sysconfig.get_platform() == "mingw" + if not self._is_windows or self._is_mingw: + bin_dir = "bin" + else: + bin_dir = "Scripts" self._path = path - bin_dir = "bin" if not self._is_windows else "Scripts" self._bin_dir = self._path / bin_dir self._base = base or path