Only offer app version downgrade if updateChannel differs from current version (#4212)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-11-02 12:07:50 -04:00
1 parent dec043f3f2
commit 7ba359be03
2 files changed
+7 -1

No files matched your search

+4
View File
@@ -131,9 +131,13 @@ export const startUpdateChecking = once(function (interval = 1000 * 60 * 60 * 24
});
export async function checkForUpdates(): Promise<void> {
const userStore = UserStore.getInstance();
try {
logger.info(`📡 Checking for app updates`);
autoUpdater.channel = userStore.updateChannel;
autoUpdater.allowDowngrade = userStore.isAllowedToDowngrade;
await autoUpdater.checkForUpdates();
} catch (error) {
logger.error(`${AutoUpdateLogPrefix}: failed with an error`, { error: String(error) });