Skip to content

Commit

Permalink
fix: normalize the name when building the index url
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Jul 14, 2022
1 parent 1985311 commit 3867742
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/unearth/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def build_evaluator(
)

def _build_index_page_link(self, index_url: str, package_name: str) -> Link:
return Link(urljoin(index_url.rstrip("/") + "/", package_name + "/"))
return Link(
urljoin(index_url.rstrip("/") + "/", canonicalize_name(package_name) + "/")
)

def _build_find_link(self, find_link: str) -> Link:
if os.path.exists(find_link):
Expand Down

0 comments on commit 3867742

Please sign in to comment.