MCPcopy Index your code
hub / github.com/github/copilot-sdk / get_asset_info

Function get_asset_info

python/copilot/_cli_version.py:60–79  ·  view source on GitHub ↗

Return (archive_filename, binary_name) for the current platform. Raises RuntimeError if the platform is not supported.

()

Source from the content-addressed store, hash-verified

58
59
60def get_asset_info() -> tuple[str, str]:
61 """Return (archive_filename, binary_name) for the current platform.
62
63 Raises RuntimeError if the platform is not supported.
64 """
65 key = get_platform_key()
66
67 # On Linux, check for musl/Alpine first
68 if key[0] == "linux" and _is_musl():
69 musl_info = _MUSL_ASSETS.get(key[1])
70 if musl_info:
71 return musl_info
72
73 info = PLATFORM_ASSETS.get(key)
74 if info is None:
75 raise RuntimeError(
76 f"Unsupported platform: {key[0]}/{key[1]}. "
77 f"Supported platforms: {', '.join(f'{p}/{m}' for p, m in PLATFORM_ASSETS)}"
78 )
79 return info
80
81
82def get_download_url(version: str, archive_name: str) -> str:

Callers 3

get_cached_cli_pathFunction · 0.85
download_cliFunction · 0.85
get_or_download_cliFunction · 0.85

Calls 4

get_platform_keyFunction · 0.85
_is_muslFunction · 0.85
joinMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…