mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
Use Squirrel.Windows --checkForUpdate
Avoid downloading updates twice. Fix #5057.
This commit is contained in:
@@ -29,7 +29,7 @@ class AutoUpdater extends EventEmitter {
|
||||
return this.emitError('Can not find Squirrel')
|
||||
}
|
||||
this.emit('checking-for-update')
|
||||
squirrelUpdate.download(this.updateURL, (error, update) => {
|
||||
squirrelUpdate.checkForUpdate(this.updateURL, (error, update) => {
|
||||
if (error != null) {
|
||||
return this.emitError(error)
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ exports.processStart = function () {
|
||||
}
|
||||
|
||||
// Download the releases specified by the URL and write new results to stdout.
|
||||
exports.download = function (updateURL, callback) {
|
||||
return spawnUpdate(['--download', updateURL], false, function (error, stdout) {
|
||||
exports.checkForUpdate = function (updateURL, callback) {
|
||||
return spawnUpdate(['--checkForUpdate', updateURL], false, function (error, stdout) {
|
||||
var json, ref, ref1, update
|
||||
if (error != null) {
|
||||
return callback(error)
|
||||
|
||||
Reference in New Issue
Block a user