mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 17:26:34 +00:00
Merge pull request #3711 from balena-io/fix-auto-update
patch: Fix auto update
This commit is contained in:
commit
f6aeb52b16
@ -43,7 +43,7 @@ async function checkForUpdates(interval: number) {
|
|||||||
const release = await autoUpdater.checkForUpdates();
|
const release = await autoUpdater.checkForUpdates();
|
||||||
const isOutdated =
|
const isOutdated =
|
||||||
semver.compare(release.updateInfo.version, version) > 0;
|
semver.compare(release.updateInfo.version, version) > 0;
|
||||||
const shouldUpdate = release.updateInfo.stagingPercentage || 0 > 0;
|
const shouldUpdate = release.updateInfo.stagingPercentage !== 0; // undefinded (default) means 100%
|
||||||
if (shouldUpdate && isOutdated) {
|
if (shouldUpdate && isOutdated) {
|
||||||
await autoUpdater.downloadUpdate();
|
await autoUpdater.downloadUpdate();
|
||||||
packageUpdated = true;
|
packageUpdated = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user