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

Function assertUserSystemdAvailable

packages/server/src/svc/systemd.ts:204–212  ·  view source on GitHub ↗
(deps: SystemdManagerDeps)

Source from the content-addressed store, hash-verified

202}
203
204async function assertUserSystemdAvailable(deps: SystemdManagerDeps): Promise<void> {
205 const probe = await deps.execSystemctl(['show-environment']);
206 if (probe.code === 0) return;
207
208 throw new ServiceUnavailableError(
209 'linux',
210 `systemd --user is not available in this environment: ${detail(probe) ?? 'systemctl --user show-environment failed'}.`,
211 );
212}
213
214function writeUnit(unitPath: string, plan: InstallPlan): void {
215 const text = buildSystemdUnit({

Callers 1

installFunction · 0.85

Calls 2

execSystemctlMethod · 0.80
detailFunction · 0.70

Tested by

no test coverage detected