Skip to content

Commit

Permalink
Force update should skip version check
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Oct 5, 2021
1 parent bcf1640 commit f2ba9e1
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(),
logger
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(),
logger
Expand Down

0 comments on commit f2ba9e1

Please sign in to comment.