Skip to content

Commit

Permalink
Backport mingw bin path corrections (#4942)
Browse files Browse the repository at this point in the history
  • Loading branch information
s0600204 authored Jan 8, 2022
1 parent d6a9d6c commit 43943ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43943ba

Please sign in to comment.