(plistPath: string, plan: InstallPlan, logPath: string)
| 255 | } |
| 256 | |
| 257 | function 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 | |
| 269 | async function bestEffortBootout(deps: LaunchdManagerDeps): Promise<void> { |
| 270 | await deps.execLaunchctl(['bootout', `${deps.guiDomain()}/${KIMI_SERVER_LABEL}`]).catch(() => { |
no test coverage detected