From 163777f75188ce53eb8f6812c13df8d26b475fd8 Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Fri, 25 Feb 2022 11:02:09 -0800 Subject: [PATCH] Move assert to a different Updater method --- ts/updater/common.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ts/updater/common.ts b/ts/updater/common.ts index 99912f9df7..24c45aa917 100644 --- a/ts/updater/common.ts +++ b/ts/updater/common.ts @@ -177,6 +177,10 @@ export abstract class Updater { if (!updateFilePath) { logger.warn('downloadAndInstall: no update was downloaded'); + strictAssert( + mode !== DownloadMode.Automatic && mode !== DownloadMode.FullOnly, + 'Automatic and full mode downloads are guaranteed to happen or error' + ); return false; } @@ -509,10 +513,6 @@ export abstract class Updater { } if (!gotUpdate) { - strictAssert( - mode !== DownloadMode.Automatic && mode !== DownloadMode.FullOnly, - 'Automatic and full mode downloads are guaranteed to happen or error' - ); return undefined; }