Move assert to a different Updater method
This commit is contained in:
parent
29c2f77d40
commit
163777f751
1 changed files with 4 additions and 4 deletions
|
@ -177,6 +177,10 @@ export abstract class Updater {
|
||||||
|
|
||||||
if (!updateFilePath) {
|
if (!updateFilePath) {
|
||||||
logger.warn('downloadAndInstall: no update was downloaded');
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -509,10 +513,6 @@ export abstract class Updater {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gotUpdate) {
|
if (!gotUpdate) {
|
||||||
strictAssert(
|
|
||||||
mode !== DownloadMode.Automatic && mode !== DownloadMode.FullOnly,
|
|
||||||
'Automatic and full mode downloads are guaranteed to happen or error'
|
|
||||||
);
|
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue