From 43943ba62f2eb7ea78687704bb5cef930cb830d5 Mon Sep 17 00:00:00 2001 From: s0600204 <2053873+s0600204@users.noreply.github.com> Date: Sat, 8 Jan 2022 19:16:05 +0000 Subject: [PATCH] Backport mingw bin path corrections (#4942) --- poetry/utils/env.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/poetry/utils/env.py b/poetry/utils/env.py index b1cff78c215..061d67ede6d 100644 --- a/poetry/utils/env.py +++ b/poetry/utils/env.py @@ -923,9 +923,13 @@ class Env(object): def __init__(self, path, base=None): # type: (Path, Optional[Path]) -> None self._is_windows = sys.platform == "win32" + self._is_mingw = sysconfig.get_platform().startswith("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