Commit 7360b09e by Dan Yeaw Committed by Arun Babu Neelicattu

utils/envs: fix envs in MSYS2 always broken

Fixes #2867, the virtual environment found seems to be broken
messages when running in MSYS2. This change detects when in MSYS2
in order to use the bin directory for the virtualenv instead of
Scripts which is normally used in Windows.
parent 0359a42d
...@@ -879,9 +879,13 @@ class Env(object): ...@@ -879,9 +879,13 @@ class Env(object):
def __init__(self, path: Path, base: Optional[Path] = None) -> None: def __init__(self, path: Path, base: Optional[Path] = None) -> None:
self._is_windows = sys.platform == "win32" 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 self._path = path
bin_dir = "bin" if not self._is_windows else "Scripts"
self._bin_dir = self._path / bin_dir self._bin_dir = self._path / bin_dir
self._base = base or path self._base = base or path
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment