autoUpdater = autoUpdater.autoUpdater
autoUpdater.autoDownload = false
autoUpdater.logger = console
autoUpdater.on('checking-for-update', () => {
console.log('Checking for update...');
})
autoUpdater.on('update-available', (info) => {
console.log('Update available.' ,info);
autoUpdater.downloadUpdate().then((path)=>{
console.log('download path', path)
}).catch((e)=>{
console.log(e)
})
})
autoUpdater.on('error', (err) => {
console.log('Error in auto-updater. ' + err);
})
autoUpdater.on('update-not-available', (info) => {
console.log('Update not available.', info);
})
autoUpdater.on('update-downloaded', (info) => {
console.log('Update downloaded');
let restart = window.confirm('shall we update ?')
if(restart){
autoUpdater.quitAndInstall()
}
});
When I chose cancel on confirm, and the quitAndInstall won't reach, the app will update silently when it quit.
Can we give a config of this behaviour ?
electron-updater 2.20.0 — set autoInstallOnAppQuit to false.
great !
electron-updater 2.20.0 — set
autoInstallOnAppQuittofalse.
Can we get this added to the documentation page for setting up autoupdate
Most helpful comment
electron-updater 2.20.0 — set
autoInstallOnAppQuittofalse.