fix: switchVersion after switchVersionLater
This commit is contained in:
parent
6d0a31d749
commit
55aaf4fa45
12
lib/main.js
12
lib/main.js
@ -181,11 +181,7 @@ export async function downloadUpdate(options, eventListeners) {
|
||||
}
|
||||
if (downloadedHash === options.hash) {
|
||||
logger(`duplicated downloaded hash ${downloadedHash}, ignored`);
|
||||
return;
|
||||
}
|
||||
if (readyHash) {
|
||||
logger(`hash ${readyHash} applied. reboot first`);
|
||||
return;
|
||||
return downloadedHash;
|
||||
}
|
||||
if (downloadingThrottling) {
|
||||
logger('repeated downloading, ignored');
|
||||
@ -261,7 +257,6 @@ export async function downloadUpdate(options, eventListeners) {
|
||||
return options.hash;
|
||||
}
|
||||
|
||||
let readyHash;
|
||||
function assertHash(hash) {
|
||||
if (!downloadedHash) {
|
||||
logger(`no downloaded hash`);
|
||||
@ -271,11 +266,6 @@ function assertHash(hash) {
|
||||
logger(`use downloaded hash ${downloadedHash} first`);
|
||||
return;
|
||||
}
|
||||
if (readyHash === hash) {
|
||||
logger(`hash ${readyHash} already applied. reboot first.`);
|
||||
return;
|
||||
}
|
||||
readyHash = hash;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user