()
| 202 | |
| 203 | // This function will force quit and install update and restart the app |
| 204 | function forceQuitAndInstallUpdate() { |
| 205 | // Disable beforeunload handlers |
| 206 | const preventUnload = (event) => { |
| 207 | event.preventDefault(); |
| 208 | pgAdminMainScreen.webContents.off('will-prevent-unload', preventUnload); |
| 209 | }; |
| 210 | pgAdminMainScreen.webContents.on('will-prevent-unload', preventUnload); |
| 211 | // Set flag to show notification after restart |
| 212 | configStore.set('update_installed', true); |
| 213 | cleanupAutoUpdateFlag(); |
| 214 | autoUpdater.quitAndInstall(); |
| 215 | } |
| 216 | |
| 217 | // This functions is used to start the pgAdmin4 server by spawning a |
| 218 | // separate process. |
no test coverage detected