Force update should skip version check

This commit is contained in:
Fedor Indutny
2021-10-05 10:50:48 -07:00
committed by GitHub
parent bcf1640587
commit f2ba9e1a9b
2 changed files with 12 additions and 2 deletions

View File

@@ -73,7 +73,12 @@ async function checkForUpdatesMaybeInstall(
const { fileName: newFileName, version: newVersion } = result; 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( const autoDownloadUpdates = await getAutoDownloadUpdateSetting(
getMainWindow(), getMainWindow(),
logger logger

View File

@@ -76,7 +76,12 @@ async function checkForUpdatesMaybeInstall(
const { fileName: newFileName, version: newVersion } = result; 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( const autoDownloadUpdates = await getAutoDownloadUpdateSetting(
getMainWindow(), getMainWindow(),
logger logger