[Updater > Module] Cleanup: Simplify host downloaded by just restarting internally

This commit is contained in:
Ducko 2022-04-25 15:08:23 +01:00
parent 52a3fa5e86
commit 2ccabfda58
2 changed files with 1 additions and 2 deletions

View file

@ -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));

View file

@ -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');