MCPcopy Index your code
hub / github.com/idank/explainshell / resolve_dump_url

Function resolve_dump_url

tools/fetch_manned.py:60–72  ·  view source on GitHub ↗

Resolve the current dump URL by reading the 'current' pointer.

(base_url)

Source from the content-addressed store, hash-verified

58
59
60def resolve_dump_url(base_url):
61 """Resolve the current dump URL by reading the 'current' pointer."""
62 result = subprocess.run(
63 ["curl", "-sfL", f"{base_url}/current"],
64 capture_output=True,
65 text=True,
66 )
67 if result.returncode != 0:
68 raise RuntimeError(f"Failed to fetch {base_url}/current")
69 date = result.stdout.strip()
70 url = f"{base_url}/{date}"
71 logger.info("Using dump: %s", url)
72 return url
73
74
75def download_file(url, dest_path):

Callers 1

cmd_downloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected