Update autoUpdater settings before checking for new versions

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2021-11-01 10:50:32 -04:00
1 parent 28d0667dd8
commit 36054a2970
1 file changed
+4
+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) });