Electron-builder: how to disable install updates when the app in normal quit?

Created on 20 Mar 2018  Â·  1Comment  Â·  Source: electron-userland/electron-builder


  • Version:
    electron-builder: 20.0.8


electron-updater: 2.21.1

  • Target: win --ia32 nsis

here is my updater event setting

 autoUpdater.on('checking-for-update', () => {
            this.sendStatusToWindow('Checking for update...')
        })
        autoUpdater.on('update-available', (ev, info) => {
            this.sendStatusToWindow('Update available.')
        })
        autoUpdater.on('update-not-available', (ev, info) => {
            this.sendStatusToWindow('Update not available.')
        })
        autoUpdater.on('error', (ev, err) => {
            this.sendStatusToWindow('Error in auto-updater.')
        })
        autoUpdater.on('download-progress', (ev, progressObj) => {
            this.sendStatusToWindow('Download progress...')
        })
        autoUpdater.on('update-downloaded', (ev, info) => {
            this.sendStatusToWindow('downloaded')
        })

and then i provide a notice UI in renderer UI View include a button to click for update;

it sends an event to call autoUpdater.quitAndInstall via the ipc;

such as

 ipcMain.on('autoupdate-message', (event, arg) => {
            switch (arg) {
                case 'installUpdate':
                    updater.quitAndInstall()
                    break
                case 'check':
                    updater.checkUpdate()
                    break
                default:
                    break
            }
        })

then it works; but...
when i get the notice message as restart to install updates, and i want to ignore it;
it also run install updates when i does as normal quite. it always run...
is there some options to disable force install update when app quit?
how can i resolve it?

question

Most helpful comment

Maybe this helps:
https://github.com/electron-userland/electron-builder/issues/2493

"electron-updater 2.20.0 — set autoInstallOnAppQuit to false."

>All comments

Maybe this helps:
https://github.com/electron-userland/electron-builder/issues/2493

"electron-updater 2.20.0 — set autoInstallOnAppQuit to false."

Was this page helpful?
0 / 5 - 0 ratings