Merge branch 'MarshallOfSound-master'
This commit is contained in:
commit
570dc7ca9b
2 changed files with 22 additions and 4 deletions
|
@ -12,6 +12,9 @@ function AutoUpdater () {
|
|||
util.inherits(AutoUpdater, EventEmitter)
|
||||
|
||||
AutoUpdater.prototype.quitAndInstall = function () {
|
||||
if (!this.updateAvailable) {
|
||||
return this.emitError('No update available, can\'t quit and install')
|
||||
}
|
||||
squirrelUpdate.processStart()
|
||||
return app.quit()
|
||||
}
|
||||
|
@ -33,8 +36,10 @@ AutoUpdater.prototype.checkForUpdates = function () {
|
|||
return this.emitError(error)
|
||||
}
|
||||
if (update == null) {
|
||||
this.updateAvailable = false
|
||||
return this.emit('update-not-available')
|
||||
}
|
||||
this.updateAvailable = true
|
||||
this.emit('update-available')
|
||||
squirrelUpdate.update(this.updateURL, (error) => {
|
||||
var date, releaseNotes, version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue