()
| 120 | }; |
| 121 | |
| 122 | const ensureSingleInstance = () => { |
| 123 | if (!app.requestSingleInstanceLock()) { |
| 124 | app.quit(); |
| 125 | return false; |
| 126 | } |
| 127 | app.on("second-instance", focusMainWindow); |
| 128 | return true; |
| 129 | }; |
| 130 | |
| 131 | /** |
| 132 | * Stop the local server only when WE own it. A supervised daemon (launchd/etc.) |