Browse Source

Use Squirrel.Windows --checkForUpdate

This cherry-picks #10483 to fix #5057.
J.M 7 years ago
parent
commit
8c28e3b6f1

+ 1 - 1
lib/browser/api/auto-updater/auto-updater-win.js

@@ -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)
       }

+ 2 - 2
lib/browser/api/auto-updater/squirrel-update-win.js

@@ -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)