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