Skip to content

Commit f7cee05

Browse files
committed
allow file:// urls in experimental_index_url
1 parent 87906f0 commit f7cee05

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/private/pypi/simpleapi_download.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def _read_simpleapi(ctx, url, attr, cache, get_auth = None, **download_kwargs):
235235
return _read_index_result(ctx, download, output, real_url, cache, cache_key)
236236

237237
def strip_empty_path_segments(url):
238-
"""Removes empty path segments from a URL. Does nothing for urls with no scheme.
238+
"""Removes empty path segments from a URL. Does nothing for urls with no scheme and file:// urls.
239239
240240
Public only for testing.
241241
@@ -246,6 +246,8 @@ def strip_empty_path_segments(url):
246246
The url with empty path segments removed and any trailing slash preserved.
247247
If the url had no scheme it is returned unchanged.
248248
"""
249+
if url.startswith("file://"):
250+
return url
249251
scheme, _, rest = url.partition("://")
250252
if rest == "":
251253
return url

0 commit comments

Comments
 (0)