Skip to content

Commit

Permalink
Only search in distributions with matching name
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Feb 8, 2021
1 parent 23f12b6 commit 015f1c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pipx/venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def _find_entry_point(self, app: str) -> Optional[EntryPoint]:
if not self.python_path.exists():
return None
site_packages = get_site_packages(self.python_path)
for dist in Distribution.discover(path=[str(site_packages)]):
for dist in Distribution.discover(name=app, path=[str(site_packages)]):
for ep in dist.entry_points:
if ep.group == "pipx.run" and ep.name == app:
return ep
Expand Down

0 comments on commit 015f1c7

Please sign in to comment.