[Updater > Module] Cleanup: Simplify host downloaded by just restarting internally
This commit is contained in:
parent
52a3fa5e86
commit
2ccabfda58
|
@ -207,7 +207,6 @@ const initOld = () => { // "Old" (not v2 / new, win32 only)
|
||||||
|
|
||||||
const segment = (tracker) => (({ name }) => {
|
const segment = (tracker) => (({ name }) => {
|
||||||
tracker.record(name, 'Complete');
|
tracker.record(name, 'Complete');
|
||||||
if (name === 'host') moduleUpdater.quitAndInstallUpdates();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
on('downloaded-module', segment(downloads));
|
on('downloaded-module', segment(downloads));
|
||||||
|
|
|
@ -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', () => {
|
hostUpdater.on('error', () => {
|
||||||
log('Modules', 'Host error');
|
log('Modules', 'Host error');
|
||||||
|
|
Loading…
Reference in New Issue