From f3905ca347283d8a55ea2bcdb558732dac3a1d2a Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 5 Oct 2021 11:28:49 -0700 Subject: [PATCH] Force update should skip version check Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> --- ts/updater/macos.ts | 7 ++++++- ts/updater/windows.ts | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ts/updater/macos.ts b/ts/updater/macos.ts index 901a6176b39..660418b4ffa 100644 --- a/ts/updater/macos.ts +++ b/ts/updater/macos.ts @@ -73,7 +73,12 @@ async function checkForUpdatesMaybeInstall( const { fileName: newFileName, version: newVersion } = result; - if (fileName !== newFileName || !version || gt(newVersion, version)) { + if ( + force || + fileName !== newFileName || + !version || + gt(newVersion, version) + ) { const autoDownloadUpdates = await getAutoDownloadUpdateSetting( getMainWindow() ); diff --git a/ts/updater/windows.ts b/ts/updater/windows.ts index 43b02a832ed..ed1fdee2da9 100644 --- a/ts/updater/windows.ts +++ b/ts/updater/windows.ts @@ -76,7 +76,12 @@ async function checkForUpdatesMaybeInstall( const { fileName: newFileName, version: newVersion } = result; - if (fileName !== newFileName || !version || gt(newVersion, version)) { + if ( + force || + fileName !== newFileName || + !version || + gt(newVersion, version) + ) { const autoDownloadUpdates = await getAutoDownloadUpdateSetting( getMainWindow() );