Skip to content

Commit

Permalink
Add .venv when it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Dec 31, 2019
1 parent 8397ed2 commit 8a6fc3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions poetry/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,12 +372,12 @@ def list(self, name=None): # type: (Optional[str]) -> List[VirtualEnv]
for p in sorted(venv_path.glob("{}-py*".format(venv_name)))
]

current_env = self.get()
venv = self._poetry.file.parent / ".venv"
if (
self._poetry.config.get("virtualenvs.in-project")
and current_env not in env_list
and venv.exists() and venv.is_dir()
):
env_list.insert(0, current_env)
env_list.insert(0, VirtualEnv(venv))
return env_list

def remove(self, python): # type: (str) -> Env
Expand Down

0 comments on commit 8a6fc3f

Please sign in to comment.