Skip to content

Commit e823657

Browse files
amartanirickeylev
andauthored
fix: Strip trailing slash for repo url (#2495)
Strip potential trailing slash when building url on the case of relative path without up-references. In particular, this fixes using `experimental_index_url` with a AWS CodeArtifact python repository, which currently fails package downloads due to an incorrect URL (with double `//`) being produced by this code. Co-authored-by: Richard Levasseur <[email protected]>
1 parent 444ca88 commit e823657

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/private/pypi/parse_simpleapi_html.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ def _absolute_url(index_url, candidate):
138138
return "{}/{}".format(index_url, last.strip("/"))
139139

140140
# relative path without up-references
141-
return "{}/{}".format(index_url, candidate)
141+
return "{}/{}".format(index_url.rstrip("/"), candidate)

0 commit comments

Comments
 (0)