I’m having a hard time figuring how to use the auto-updater
module in atom-shell
. From what the docs says, the following code should at least issue a request on my local server, but unfortunately it does nothing, no errors, no event dispatched, nothing.
Here’s the code I use in my window startup script (not the app main, but the window one):
remote = require 'remote'
autoUpdater = remote.require 'auto-updater'
autoUpdater.on 'error', (e,m) -> console.log('error', e, m)
autoUpdater.on 'checking-for-update', (e,m) -> console.log('checking-for-update', e, m)
autoUpdater.on 'update-available', (e,m) -> console.log('update-available', e,m)
autoUpdater.on 'update-not-available', (e,m) -> console.log('update-not-available', e,m)
try
autoUpdater.setFeedUrl "http://localhost:3001/client/latest?version=0.1.0"
autoUpdater.checkForUpdates()
catch e
console.log e
I’ve tried moving this code in the app main.js
with no success.
If anyone that have worked with atom-shell and have successfully implemented the auto-update feature could help me finding what I did wrong it’ll be great.
cc/ @zcbenz @kevinsawicki
Configuration
- atom-shell v0.20.5
- OSX 10.10.1