mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
fix update error
This commit is contained in:
@@ -44,7 +44,7 @@ const updater = new GhReleases(ghReleasesOpts)
|
||||
// Check for updates
|
||||
// `status` returns true if there is a new update available
|
||||
function checkUpdate () {
|
||||
if (process.platform === 'linux') {
|
||||
if (process.platform === 'linux' || isUpdateReady) {
|
||||
return true
|
||||
}
|
||||
updater.check((err, status) => {
|
||||
@@ -54,6 +54,7 @@ function checkUpdate () {
|
||||
return
|
||||
}
|
||||
if (status) {
|
||||
mainWindow.webContents.send('update-found', 'Update available!')
|
||||
updater.download()
|
||||
}
|
||||
})
|
||||
@@ -69,6 +70,7 @@ updater.on('update-downloaded', (info) => {
|
||||
ipc.on('update-app-confirm', function (event, msg) {
|
||||
console.log('confirmed')
|
||||
if (isUpdateReady) {
|
||||
mainWindow.removeAllListeners()
|
||||
updater.install()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user