How to use the electron-updater.autoUpdater.removeListener function in electron-updater

To help you get started, we’ve selected a few electron-updater examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Opentrons / opentrons / app-shell / src / update.js View on Github external
function done(payload: *) {
    updater.removeListener('update-available', onAvailable)
    updater.removeListener('update-not-available', onNotAvailable)
    updater.removeListener('error', onError)
    dispatch({ type: 'shell:CHECK_UPDATE_RESULT', payload })
  }
}
github Opentrons / opentrons / app-shell / src / update.js View on Github external
function done(payload: *) {
    updater.removeListener('update-downloaded', onDownloaded)
    updater.removeListener('error', onError)
    dispatch({ type: 'shell:DOWNLOAD_UPDATE_RESULT', payload })
  }
}
github Opentrons / opentrons / app-shell / src / update.js View on Github external
function done(payload: *) {
    updater.removeListener('update-downloaded', onDownloaded)
    updater.removeListener('error', onError)
    dispatch({ type: 'shell:DOWNLOAD_UPDATE_RESULT', payload })
  }
}
github Opentrons / opentrons / app-shell / src / update.js View on Github external
function done(payload: *) {
    updater.removeListener('update-available', onAvailable)
    updater.removeListener('update-not-available', onNotAvailable)
    updater.removeListener('error', onError)
    dispatch({ type: 'shell:CHECK_UPDATE_RESULT', payload })
  }
}
github AugurProject / augur-app / src / main / check-for-updates.js View on Github external
module.exports = (notifyUpdateNotAvailable = false) => {
  if(isDev) return Promise.resolve()
  if(process.platform == "linux" && !process.env.APPIMAGE) return Promise.resolve()

  const p = new Promise((resolve) => {
    autoUpdater
      .once('update-not-available', resolve)
      .once('update-available', notifyUpdate(resolve))
  })

  autoUpdater
    .removeListener('update-not-available', notifyNoUpdate)

  if (notifyUpdateNotAvailable) autoUpdater
    .once('update-not-available', notifyNoUpdate)


  return autoUpdater.checkForUpdates().catch((e) => {
    log.error('There was an error updating app. This is expected if using deb package.')

    return Promise.resolve(p);
  });

  return p;
}
github Opentrons / opentrons / app-shell / src / update.js View on Github external
function done(payload: *) {
    updater.removeListener('update-available', onAvailable)
    updater.removeListener('update-not-available', onNotAvailable)
    updater.removeListener('error', onError)
    dispatch({ type: 'shell:CHECK_UPDATE_RESULT', payload })
  }
}