spawn -> spawnUpdate

This commit is contained in:
Kevin Sawicki
2014-11-13 15:16:47 -08:00
parent adf7e17fce
commit 508ca12be9

View File

@@ -20,7 +20,7 @@ class AutoUpdater
spawnUpdate: (args, callback) ->
stdout = ''
error = null
updateProcess = ChildProcess.spawn(@updateDotExe, args)
updateProcess = ChildProcess.spawnUpdate(@updateDotExe, args)
updateProcess.stdout.on 'data', (data) -> stdout += data
updateProcess.on 'error', (processError) -> error ?= processError
updateProcess.on 'close', (code, signal) ->
@@ -35,14 +35,14 @@ class AutoUpdater
shellAutoUpdater.quitAndInstall()
return
@spawn ['--update', @updateUrl], (error) =>
@spawnUpdate ['--update', @updateUrl], (error) =>
return if error?
@spawn ['--processStart', 'atom.exe'], ->
@spawnUpdate ['--processStart', 'atom.exe'], ->
shellAutoUpdater.quitAndInstall()
downloadUpdate: (callback) ->
@spawn ['--download', @updateUrl], (error, stdout) ->
@spawnUpdate ['--download', @updateUrl], (error, stdout) ->
return callback(error) if error?
try
@@ -56,7 +56,7 @@ class AutoUpdater
callback(null, update)
installUpdate: (callback) ->
@spawn(['--update', @updateUrl], callback)
@spawnUpdate(['--update', @updateUrl], callback)
checkForUpdates: ->
throw new Error('Update URL is not set') unless @updateUrl