Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #381 from jhermann/fix-jail-list-ghosts
Browse files Browse the repository at this point in the history
jail list: do not list ghosted entrypoints
  • Loading branch information
orsinium committed Mar 12, 2020
2 parents d79070b + 6d5f416 commit 2a696d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dephell/commands/jail_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ def build_parser(parser) -> ArgumentParser:
def __call__(self) -> bool:
venvs_path = self.config['venv'].replace('-{digest}', '')
venvs_path = venvs_path.format(project='*', digest='', env='')
venvs_path = str(Path(venvs_path))
venvs_path = str(Path(venvs_path).resolve())

entrypoints = defaultdict(list)
for entrypoint in Path(self.config['bin']).iterdir():
if not entrypoint.exists():
continue # jail disappeared on disk
venv_path = entrypoint.resolve().parent.parent
if venv_path.match(venvs_path):
entrypoints[venv_path.name].append(entrypoint.name)
Expand Down

0 comments on commit 2a696d5

Please sign in to comment.