diff --git a/nox/virtualenv.py b/nox/virtualenv.py index 501118f9..4d928ab5 100644 --- a/nox/virtualenv.py +++ b/nox/virtualenv.py @@ -231,9 +231,16 @@ def _clean_location(self) -> bool: @property def bin_paths(self) -> List[str]: """Returns the location of the conda env's bin folder.""" - # see https://docs.anaconda.com/anaconda/user-guide/tasks/integration/python-path/#examples + # see https://github.com/conda/conda/blob/f60f0f1643af04ed9a51da3dd4fa242de81e32f4/conda/activate.py#L563-L572 if _SYSTEM == "Windows": - return [self.location, os.path.join(self.location, "Scripts")] + return [ + self.location, + os.path.join(self.location, "Library", "mingw-w64", "bin"), + os.path.join(self.location, "Library", "usr", "bin"), + os.path.join(self.location, "Library", "bin"), + os.path.join(self.location, "Scripts"), + os.path.join(self.location, "bin"), + ] else: return [os.path.join(self.location, "bin")] diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py index c1df7119..441eaa89 100644 --- a/tests/test_virtualenv.py +++ b/tests/test_virtualenv.py @@ -230,7 +230,14 @@ def test_conda_env_create_verbose(make_conda): @mock.patch("nox.virtualenv._SYSTEM", new="Windows") def test_condaenv_bin_windows(make_conda): venv, dir_ = make_conda() - assert [dir_.strpath, dir_.join("Scripts").strpath] == venv.bin_paths + assert [ + dir_.strpath, + dir_.join("Library", "mingw-w64", "bin").strpath, + dir_.join("Library", "usr", "bin").strpath, + dir_.join("Library", "bin").strpath, + dir_.join("Scripts").strpath, + dir_.join("bin").strpath, + ] == venv.bin_paths @pytest.mark.skipif(not HAS_CONDA, reason="Missing conda command.")