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

Function canRemoveRegistryEntry

src/daemon/daemon-registry.ts:207–227  ·  view source on GitHub ↗
(
  entry: DaemonRegistryEntry,
  workspaceKey: string,
  options?: DaemonFileCleanupOptions,
)

Source from the content-addressed store, hash-verified

205}
206
207function canRemoveRegistryEntry(
208 entry: DaemonRegistryEntry,
209 workspaceKey: string,
210 options?: DaemonFileCleanupOptions,
211): boolean {
212 if (!entryMatchesCleanupTarget(entry, workspaceKey, options)) {
213 return false;
214 }
215
216 if (!isPidAlive(entry.pid)) {
217 return true;
218 }
219
220 if (options?.allowLiveOwner !== true) {
221 return false;
222 }
223 if (options.pid === undefined || entry.pid !== options.pid) {
224 return false;
225 }
226 return entry.instanceId !== undefined && options.instanceId === entry.instanceId;
227}
228
229function removeRegistryAtPathIfOwned(
230 registryPath: string,

Callers 1

Calls 2

isPidAliveFunction · 0.90

Tested by

no test coverage detected