MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / isMuslEnvironment

Function isMuslEnvironment

source code/utils/envDynamic.ts:54–61  ·  view source on GitHub ↗

* Checks if the system is using MUSL libc instead of glibc. * In native linux builds, this is statically known at compile time via IS_LIBC_MUSL/IS_LIBC_GLIBC flags. * In node (unbundled), both flags are false and we fall back to a runtime async stat check * whose result is cached at module load.

()

Source from the content-addressed store, hash-verified

52 * whose result is cached at module load. If the cache isn't populated yet, returns false.
53 */
54function isMuslEnvironment(): boolean {
55 if (feature('IS_LIBC_MUSL')) return true
56 if (feature('IS_LIBC_GLIBC')) return false
57
58 // Fallback for node: runtime detection via pre-populated cache
59 if (process.platform !== 'linux') return false
60 return muslRuntimeCache ?? false
61}
62
63// Cache for async JetBrains detection
64let jetBrainsIDECache: string | null | undefined

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected