Skip to content
This repository was archived by the owner on Nov 21, 2019. It is now read-only.

Commit e2c2f16

Browse files
author
icymind
committed
cleanup
1 parent cd35077 commit e2c2f16

File tree

5 files changed

+10
-699
lines changed

5 files changed

+10
-699
lines changed

src/main/index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
import { autoUpdater } from 'electron-updater'
4+
// import logger from '@/lib/logger'
45

56
const { app, BrowserWindow, Menu } = require('electron')
67

@@ -146,12 +147,17 @@ process.on('uncaughtException', function (err) {
146147
* https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-electron-builder.html#auto-updating
147148
*/
148149

149-
// import { autoUpdater } from 'electron-updater'
150-
150+
autoUpdater.Logger = console
151+
autoUpdater.autoDownload = true
152+
autoUpdater.allowPrerelease = false
151153
autoUpdater.on('update-downloaded', () => {
152154
autoUpdater.quitAndInstall()
153155
})
154-
156+
autoUpdater.on('update-available', () => {
157+
})
158+
autoUpdater.on('update-not-available', () => {
159+
console.info('no update available')
160+
})
155161
app.on('ready', () => {
156-
if (process.env.NODE_ENV === 'production') autoUpdater.checkForUpdates()
162+
autoUpdater.checkForUpdates()
157163
})

0 commit comments

Comments
 (0)