Skip to content

Commit

Permalink
fix: fixing downloadPromise not resolving on Mac. (#5802)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinzak-zaber committed Apr 23, 2021
1 parent 28cb86b commit d57453c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/electron-updater/src/MacUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,15 @@ export class MacUpdater extends AppUpdater {
headers: { "Cache-Control": "no-cache" },
})

this.nativeUpdater.once("error", reject)

// The update has been downloaded and is ready to be served to Squirrel
this.dispatchUpdateDownloaded(event)

if (this.autoInstallOnAppQuit) {
this.nativeUpdater.once("error", reject)
// This will trigger fetching and installing the file on Squirrel side
this.nativeUpdater.checkForUpdates()
} else {
resolve([])
}
})
})
Expand Down

0 comments on commit d57453c

Please sign in to comment.