Use Squirrel.Windows --checkForUpdate

Avoid downloading updates twice. Fix #5057.
This commit is contained in:
J.M 2017-09-11 00:54:08 +02:00
parent f293e1422b
commit 6442e6b5e8
2 changed files with 3 additions and 3 deletions

View file

@ -29,7 +29,7 @@ class AutoUpdater extends EventEmitter {
return this.emitError('Can not find Squirrel') return this.emitError('Can not find Squirrel')
} }
this.emit('checking-for-update') this.emit('checking-for-update')
squirrelUpdate.download(this.updateURL, (error, update) => { squirrelUpdate.checkForUpdate(this.updateURL, (error, update) => {
if (error != null) { if (error != null) {
return this.emitError(error) return this.emitError(error)
} }

View file

@ -82,8 +82,8 @@ exports.processStart = function () {
} }
// Download the releases specified by the URL and write new results to stdout. // Download the releases specified by the URL and write new results to stdout.
exports.download = function (updateURL, callback) { exports.checkForUpdate = function (updateURL, callback) {
return spawnUpdate(['--download', updateURL], false, function (error, stdout) { return spawnUpdate(['--checkForUpdate', updateURL], false, function (error, stdout) {
var json, ref, ref1, update var json, ref, ref1, update
if (error != null) { if (error != null) {
return callback(error) return callback(error)