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

Function writePlist

packages/server/src/svc/launchd.ts:257–267  ·  view source on GitHub ↗
(plistPath: string, plan: InstallPlan, logPath: string)

Source from the content-addressed store, hash-verified

255}
256
257function writePlist(plistPath: string, plan: InstallPlan, logPath: string): void {
258 const xml = buildLaunchAgentPlist({
259 label: KIMI_SERVER_LABEL,
260 comment: 'Kimi Code local server (managed by `kimi server install`).',
261 programArguments: plan.programArguments,
262 stdoutPath: logPath,
263 stderrPath: logPath,
264 });
265 mkdirSync(dirname(plistPath), { recursive: true, mode: LAUNCH_AGENT_DIR_MODE });
266 writeFileSync(plistPath, xml, { mode: PLIST_MODE });
267}
268
269async function bestEffortBootout(deps: LaunchdManagerDeps): Promise<void> {
270 await deps.execLaunchctl(['bootout', `${deps.guiDomain()}/${KIMI_SERVER_LABEL}`]).catch(() => {

Callers 1

installFunction · 0.85

Calls 1

buildLaunchAgentPlistFunction · 0.90

Tested by

no test coverage detected