MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / macOsProductVersion

Function macOsProductVersion

packages/oauth/src/identity.ts:158–168  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157
158function macOsProductVersion(): string | undefined {
159 try {
160 const version = execFileSync('/usr/bin/sw_vers', ['-productVersion'], {
161 encoding: 'utf-8',
162 timeout: 1000,
163 }).trim();
164 return version.length > 0 ? version : undefined;
165 } catch {
166 return undefined;
167 }
168}
169
170function asciiHeader(value: string, fallback = 'unknown'): string {
171 const cleaned = value.replaceAll(/[^\u0020-\u007E]/g, '').trim();

Callers 1

deviceModelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected