From 2ccabfda58de64b54645b96bfcef1d4253043144 Mon Sep 17 00:00:00 2001 From: Oj Date: Mon, 25 Apr 2022 15:08:23 +0100 Subject: [PATCH] [Updater > Module] Cleanup: Simplify host downloaded by just restarting internally --- src/splash/index.js | 1 - src/updater/moduleUpdater.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/splash/index.js b/src/splash/index.js index c553856..d26de68 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -207,7 +207,6 @@ const initOld = () => { // "Old" (not v2 / new, win32 only) const segment = (tracker) => (({ name }) => { tracker.record(name, 'Complete'); - if (name === 'host') moduleUpdater.quitAndInstallUpdates(); }); on('downloaded-module', segment(downloads)); diff --git a/src/updater/moduleUpdater.js b/src/updater/moduleUpdater.js index 43e6b2a..12508d5 100644 --- a/src/updater/moduleUpdater.js +++ b/src/updater/moduleUpdater.js @@ -85,7 +85,7 @@ exports.init = (endpoint, { releaseChannel, version }) => { }); }); - hostUpdater.on('update-downloaded', () => events.emit('downloaded-module', { name: 'host' })); + hostUpdater.on('update-downloaded', hostUpdater.quitAndInstall); hostUpdater.on('error', () => { log('Modules', 'Host error');