Catch errors spawning squirrel

Closes #4895
This commit is contained in:
Kevin Sawicki
2015-01-07 10:19:09 -08:00
parent 184aecb4a4
commit fb3cc5554c
2 changed files with 18 additions and 2 deletions

View File

@@ -25,6 +25,16 @@ describe "Windows squirrel updates", ->
else
originalSpawn('ls')
it "ignores errors spawning Squirrel", ->
jasmine.unspy(ChildProcess, 'spawn')
spyOn(ChildProcess, 'spawn').andCallFake -> throw new Error("EBUSY")
app = quit: jasmine.createSpy('quit')
expect(SquirrelUpdate.handleStartupEvent(app, '--squirrel-install')).toBe true
waitsFor ->
app.quit.callCount is 1
it "quits the app on all squirrel events", ->
app = quit: jasmine.createSpy('quit')