Skip to content

Commit 755a41f

Browse files
committed
fix: allow downgrade when switching update channels
When switching from nightly to stable, the nightly version's semver base may be higher than the latest stable release (e.g., 0.0.18-nightly.xxx vs stable 0.0.17). Previously, applyAutoUpdaterChannel set allowDowngrade to false for the 'latest' channel, causing electron-updater to treat this as a downgrade and refuse the update. Override allowDowngrade to true after applyAutoUpdaterChannel when handling a channel change, so users can always switch between channels regardless of version ordering. On next app start, allowDowngrade is reset correctly for regular update checks.
1 parent 97efd80 commit 755a41f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/desktop/src/main.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,6 +1756,7 @@ function registerIpcHandlers(): void {
17561756
}
17571757

17581758
applyAutoUpdaterChannel(nextChannel);
1759+
autoUpdater.allowDowngrade = true;
17591760
await checkForUpdates("channel-change");
17601761
return updateState;
17611762
});

0 commit comments

Comments
 (0)