MCPcopy Create free account
hub / github.com/anomalyco/opencode / isMusl

Function isMusl

packages/opencode/script/postinstall.mjs:79–94  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79function isMusl() {
80 if (platform !== "linux") return false
81
82 try {
83 if (fs.existsSync("/etc/alpine-release")) return true
84 } catch {
85 // Ignore filesystem probes that are blocked by the host.
86 }
87
88 try {
89 const result = childProcess.spawnSync("ldd", ["--version"], { encoding: "utf8" })
90 return `${result.stdout || ""}${result.stderr || ""}`.toLowerCase().includes("musl")
91 } catch {
92 return false
93 }
94}
95
96function packageNames() {
97 const baseline = arch === "x64" && !supportsAvx2()

Callers 1

packageNamesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected