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

Function _is_musl

python/copilot/_cli_version.py:40–52  ·  view source on GitHub ↗

Detect whether the current Linux system uses musl libc (e.g. Alpine).

()

Source from the content-addressed store, hash-verified

38
39
40def _is_musl() -> bool:
41 """Detect whether the current Linux system uses musl libc (e.g. Alpine)."""
42 if sys.platform != "linux":
43 return False
44 try:
45 import subprocess
46
47 result = subprocess.run(["ldd", "--version"], capture_output=True, text=True, timeout=5)
48 # musl's ldd prints "musl libc" in its output
49 output = result.stdout + result.stderr
50 return "musl" in output.lower()
51 except (FileNotFoundError, subprocess.TimeoutExpired, OSError):
52 return False
53
54
55def get_platform_key() -> tuple[str, str]:

Callers 1

get_asset_infoFunction · 0.85

Calls 1

runMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…