Always revalidate desktop updates before install

This commit is contained in:
Mohamed Boudra
2026-07-16 20:17:58 +02:00
parent 04c71c5890
commit 7d80fdfd12
8 changed files with 340 additions and 285 deletions
+11
View File
@@ -85,6 +85,7 @@ import {
import { runDesktopStartup } from "./desktop-startup.js";
import { autoUpdateInstalledSkills } from "./integrations/skills/index.js";
import { registerBrowserAutomationIpc } from "./features/browser-automation/ipc.js";
import { installAppUpdateOnQuit } from "./features/auto-updater.js";
const DEV_SERVER_URL = process.env.EXPO_DEV_URL ?? "http://localhost:8081";
const APP_SCHEME = "paseo";
@@ -998,9 +999,19 @@ app.on(
stopDaemon: () => stopDesktopDaemonViaCli("quit"),
showShutdownFeedback: showDaemonShutdownDialog,
}),
installAppUpdateOnQuit: async () => {
const settings = await getDesktopSettingsStore().get();
return installAppUpdateOnQuit({
currentVersion: app.getVersion(),
releaseChannel: settings.releaseChannel,
});
},
onStopError: (error) => {
log.error("[desktop daemon] failed to stop managed daemon on quit", error);
},
onUpdateError: (error) => {
log.error("[auto-updater] failed to validate downloaded update on quit", error);
},
}),
);