diff --git a/src/main/app.ts b/src/main/app.ts index 7cc5dbad..c42c454f 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -532,29 +532,34 @@ export class JupyterApplication implements IApplication, IDisposable { } private _setupAutoUpdater() { - autoUpdater.on('update-downloaded', (event, releaseNotes, releaseName) => { - const dialogOpts: Electron.MessageBoxOptions = { - type: 'info', - buttons: ['Restart', 'Later'], - title: 'Application Update', - message: process.platform === 'win32' ? releaseNotes : releaseName, - detail: - 'A new version has been downloaded. Restart the application to apply the updates.' - }; + autoUpdater.once( + 'update-downloaded', + (event, releaseNotes, releaseName) => { + const dialogOpts: Electron.MessageBoxOptions = { + type: 'info', + buttons: ['Restart', 'Later'], + title: 'Application Update', + message: process.platform === 'win32' ? releaseNotes : releaseName, + detail: + 'A new version has been downloaded. Restart the application to apply the updates.' + }; - dialog.showMessageBox(dialogOpts).then(returnValue => { - if (returnValue.response === 0) { - if ( - userSettings.getValue(SettingType.updateBundledEnvAutomatically) && - bundledEnvironmentIsInstalled() - ) { - appData.updateBundledEnvOnRestart = true; - appData.save(); + dialog.showMessageBox(dialogOpts).then(returnValue => { + if (returnValue.response === 0) { + if ( + userSettings.getValue( + SettingType.updateBundledEnvAutomatically + ) && + bundledEnvironmentIsInstalled() + ) { + appData.updateBundledEnvOnRestart = true; + appData.save(); + } + autoUpdater.quitAndInstall(); } - autoUpdater.quitAndInstall(); - } - }); - }); + }); + } + ); autoUpdater.on('error', message => { log.error('There was a problem updating the application'); diff --git a/troubleshoot.md b/troubleshoot.md index 58e3d24f..4afc404e 100644 --- a/troubleshoot.md +++ b/troubleshoot.md @@ -291,6 +291,7 @@ You can use the CLI commands to list and change project setting overrides. See [ This repo contains the most up to date documentation on JupyterLab Desktop. However you can refer to the Jupyter blog posts on JLD for more context and information on the application. Below are the links to the blog posts. +- [Python environment management using JupyterLab Desktop CLI (03/01/2024)](https://blog.jupyter.org/python-environment-management-using-jupyterlab-desktop-cli-e57485c9287c) - [Python environment management in JupyterLab Desktop (02/20/2024)](https://blog.jupyter.org/python-environment-management-in-jupyterlab-desktop-3b119c5811d9) - [Introducing the new JupyterLab Desktop! (02/09/2023)](https://blog.jupyter.org/introducing-the-new-jupyterlab-desktop-bca1982bdb23) - [JupyterLab Desktop — 2022 recap (12/13/2022)](https://blog.jupyter.org/jupyterlab-desktop-2022-recap-28bdf00205c6)