From 60709c4fadfe154db5550b040fa9af06f0c7da9a Mon Sep 17 00:00:00 2001 From: MasterAcnolo Date: Sun, 28 Jun 2026 21:48:24 +0200 Subject: [PATCH] fix: don't show dialog box if no previous version is available. --- app/autoUpdater.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/autoUpdater.js b/app/autoUpdater.js index cf2a67d..3f55799 100644 --- a/app/autoUpdater.js +++ b/app/autoUpdater.js @@ -96,8 +96,20 @@ function initAutoUpdater(mainWindow) { * Logs failure and displays an error dialog to user. */ autoUpdater.on("error", (err) => { - logger.error("Auto update error:", err.message); - dialog.showErrorBox("Update Error", err.message); + const msg = err?.message || ""; + + /** + * If no update is available, I put this because there is no Linux version before 1.6.0 + * @type {boolean} + */ + const isNoUpdateAvailable = /404/.test(msg) || /Cannot find latest.*\.yml/i.test(msg); + + if (isNoUpdateAvailable) { + logger.warn("Auto update: no update metadata found (probably no previous release), ignoring", msg); + return; + } + + logger.error("Auto update error:", msg); }); checkForUpdates();