Simpilfy auto_updater api.
This commit is contained in:
parent
f36569c3b9
commit
8f2b998718
3 changed files with 45 additions and 62 deletions
|
@ -1,9 +1,8 @@
|
|||
AutoUpdater = process.atomBinding('auto_updater').AutoUpdater
|
||||
autoUpdater = process.atomBinding('auto_updater').autoUpdater
|
||||
EventEmitter = require('events').EventEmitter
|
||||
|
||||
AutoUpdater::__proto__ = EventEmitter.prototype
|
||||
autoUpdater.__proto__ = EventEmitter.prototype
|
||||
|
||||
autoUpdater = new AutoUpdater
|
||||
autoUpdater.on 'update-downloaded-raw', (args...) ->
|
||||
args[3] = new Date(args[3]) # releaseDate
|
||||
@emit 'update-downloaded', args..., => @quitAndInstall()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue