Skip to content

Commit 2d19ef9

Browse files
fix: fallback to browser on quitAndInstall failure (unsigned builds)
1 parent 7e2bb0f commit 2d19ef9

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/main/updater.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,14 @@ export function setupAutoUpdater(getWindow: () => BrowserWindow | null): void {
7272
}
7373
})
7474

75-
// IPC: quit and install
76-
ipcMain.handle('updater:install', () => {
77-
autoUpdater.quitAndInstall(false, true)
75+
// IPC: quit and install (falls back to browser on macOS without code signing)
76+
ipcMain.handle('updater:install', async () => {
77+
try {
78+
autoUpdater.quitAndInstall(false, true)
79+
} catch (err) {
80+
log.warn('quitAndInstall failed, opening release page:', err)
81+
shell.openExternal(`https://github.com/AnasProgrammer2/netcopilot/releases/latest`)
82+
}
7883
})
7984

8085
// IPC: open release page in browser (fallback for unsigned builds)

tsconfig.node.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)