()
| 112 | }; |
| 113 | |
| 114 | const ensureSingleInstance = () => { |
| 115 | if (!app.requestSingleInstanceLock()) { |
| 116 | app.quit(); |
| 117 | return false; |
| 118 | } |
| 119 | app.on("second-instance", focusMainWindow); |
| 120 | return true; |
| 121 | }; |
| 122 | |
| 123 | /** |
| 124 | * Stop the local server only when WE own it. A supervised daemon (launchd/etc.) |