MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / ensureSingleInstance

Function ensureSingleInstance

apps/desktop/src/main/index.ts:131–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129};
130
131const ensureSingleInstance = () => {
132 if (!app.requestSingleInstanceLock()) {
133 app.quit();
134 return false;
135 }
136 app.on("second-instance", focusMainWindow);
137 return true;
138};
139
140/**
141 * Stop the local server only when WE own it. A supervised daemon (launchd/etc.)

Callers 1

index.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected