MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / validateCurrentRegistryEntry

Function validateCurrentRegistryEntry

src/cli/daemon-control.ts:39–54  ·  view source on GitHub ↗
(
  expectedEntry: DaemonRegistryEntry,
  currentEntry: DaemonRegistryEntry | null,
  socketPath: string,
)

Source from the content-addressed store, hash-verified

37}
38
39function validateCurrentRegistryEntry(
40 expectedEntry: DaemonRegistryEntry,
41 currentEntry: DaemonRegistryEntry | null,
42 socketPath: string,
43): void {
44 const matchesExpectedEntry =
45 currentEntry !== null &&
46 currentEntry.workspaceKey === expectedEntry.workspaceKey &&
47 currentEntry.socketPath === expectedEntry.socketPath &&
48 currentEntry.pid === expectedEntry.pid &&
49 currentEntry.instanceId === expectedEntry.instanceId;
50
51 if (!matchesExpectedEntry) {
52 throw new Error(`Cannot force-stop daemon at ${socketPath}: daemon registry metadata changed`);
53 }
54}
55
56function signalDaemonPid(pid: number, signal: NodeJS.Signals): boolean {
57 try {

Callers 1

forceStopDaemonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected