Meta: Don't attempt to download WPT test resources from external URLs

This commit is contained in:
Tim Ledbetter 2025-10-13 08:28:36 +01:00 committed by Sam Atkins
parent 61185d98aa
commit 2f5481284d
Notes: github-actions[bot] 2025-10-14 10:21:27 +00:00

View file

@ -157,6 +157,10 @@ def map_to_path(
if source.resource.startswith("/") or not is_resource:
file_path = Path(base_directory, source.resource.lstrip("/"))
else:
parsed_url = urlparse(source.resource)
if parsed_url.scheme != "":
print(f"Skipping '{source.resource}'. Downloading external resources is not supported.")
continue
# Add it as a sibling path if it's a relative resource
sibling_location = Path(resource_path).parent
parent_directory = Path(base_directory, sibling_location)