1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Update autoUpdater settings before checking for new versions

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2021-11-01 10:50:32 -04:00
parent 28d0667dd8
commit 36054a2970

View File

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