Merge pull request #12619 from electron/add-before-update-event

add new event to auto-updater
This commit is contained in:
Zeke Sikelianos 2018-04-16 12:43:15 -07:00 committed by GitHub
commit 40ff17c9f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -104,6 +104,8 @@ void AutoUpdater::SetFeedURL(mate::Arguments* args) {
}
void AutoUpdater::QuitAndInstall() {
Emit("before-quit-for-update");
// If we don't have any window then quitAndInstall immediately.
if (WindowList::IsEmpty()) {
auto_updater::AutoUpdater::QuitAndInstall();