Spawn new atom.exe immediately on quitAndInstall

This commit is contained in:
Kevin Sawicki
2014-12-02 10:30:58 -08:00
parent 38e6aee46d
commit 0fe9dc6aa9

View File

@@ -9,15 +9,11 @@ class AutoUpdater
setFeedUrl: (@updateUrl) ->
quitAndInstall: ->
unless SquirrelUpdate.existsSync()
shellAutoUpdater.quitAndInstall()
return
@installUpdate (error) ->
return if error?
if SquirrelUpdate.existsSync()
SquirrelUpdate.spawn ['--processStart', 'atom.exe'], ->
shellAutoUpdater.quitAndInstall()
else
shellAutoUpdater.quitAndInstall()
downloadUpdate: (callback) ->
SquirrelUpdate.spawn ['--download', @updateUrl], (error, stdout) ->