Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Commit 330dfe0

Browse files
authored
Merge pull request #44 from closedloop-ai/fix-auto-update-bugs
Fix auto-update error visibility and add zip target
2 parents 592ac71 + 80ab127 commit 330dfe0

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

apps/desktop/electron-builder.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ mac:
2020
- target: dmg
2121
arch:
2222
- universal
23+
- target: zip
24+
arch:
25+
- universal
2326
hardenedRuntime: true
2427
entitlements: build/entitlements.mac.plist
2528
entitlementsInherit: build/entitlements.mac.plist

apps/desktop/src/main/app.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,16 +256,25 @@ export class DesktopApplication {
256256
if (app.isPackaged) {
257257
autoUpdater.autoDownload = true;
258258
autoUpdater.autoInstallOnAppQuit = true;
259+
autoUpdater.on("error", (err) => {
260+
gatewayLog.error("auto-update", `Auto-update error: ${err.message}`);
261+
});
259262
autoUpdater.on("update-available", (info) => {
260263
this.desktopWindow.getWindow()?.webContents.send("desktop:update-available", {
261264
updateAvailable: true,
262265
version: info.version
263266
});
264267
});
265-
void autoUpdater.checkForUpdates().catch(() => {});
268+
void autoUpdater.checkForUpdates().catch((err: unknown) => {
269+
const msg = err instanceof Error ? err.message : String(err);
270+
gatewayLog.error("auto-update", `Failed to check for updates: ${msg}`);
271+
});
266272
if (this.updateCheckTimer) clearInterval(this.updateCheckTimer);
267273
this.updateCheckTimer = setInterval(() => {
268-
void autoUpdater.checkForUpdates().catch(() => {});
274+
void autoUpdater.checkForUpdates().catch((err: unknown) => {
275+
const msg = err instanceof Error ? err.message : String(err);
276+
gatewayLog.error("auto-update", `Failed to check for updates: ${msg}`);
277+
});
269278
}, UPDATE_CHECK_INTERVAL_MS);
270279
} else {
271280
void this.checkForUpdate().then((result) => {

0 commit comments

Comments
 (0)