Skip to content

Commit

Permalink
Force update should skip version check
Browse files Browse the repository at this point in the history
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
  • Loading branch information
automated-signal and indutny-signal committed Oct 5, 2021
1 parent 4a825aa commit f3905ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion ts/updater/macos.ts
Expand Up @@ -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()
);
Expand Down
7 changes: 6 additions & 1 deletion ts/updater/windows.ts
Expand Up @@ -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()
);
Expand Down

0 comments on commit f3905ca

Please sign in to comment.