From 8953042ee3e868d8c7d275f70e69f13b2b63c5cc Mon Sep 17 00:00:00 2001 From: Ajey Charantimath Date: Wed, 25 Oct 2017 20:29:49 +0530 Subject: [PATCH 1/3] Updated auto-updater.md Missing documentation on the issue https://github.com/electron/electron/issues/10903 --- docs/api/auto-updater.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/api/auto-updater.md b/docs/api/auto-updater.md index 9631ad7592..22a3793e2c 100644 --- a/docs/api/auto-updater.md +++ b/docs/api/auto-updater.md @@ -109,10 +109,12 @@ using this API. Restarts the app and installs the update after it has been downloaded. It should only be called after `update-downloaded` has been emitted. -**Note:** `autoUpdater.quitAndInstall()` will close all application windows +**Note 1:** `autoUpdater.quitAndInstall()` will close all application windows first and only emit `before-quit` event on `app` after that. This is different from the normal quit event sequence. +**Note 2:** If you don't call `autoUpdater.quitAndInstall()` after `update-downloaded` event has been emitted then you will get the updated app on the next start/run of your app. + [squirrel-mac]: https://github.com/Squirrel/Squirrel.Mac [server-support]: https://github.com/Squirrel/Squirrel.Mac#server-support [squirrel-windows]: https://github.com/Squirrel/Squirrel.Windows From 4dee7782124c325ec575ab7a1ac4b8f54b947ac8 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 19 Dec 2017 15:39:57 +0900 Subject: [PATCH 2/3] Clearer wording --- docs/api/auto-updater.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/api/auto-updater.md b/docs/api/auto-updater.md index 22a3793e2c..d3b6d54756 100644 --- a/docs/api/auto-updater.md +++ b/docs/api/auto-updater.md @@ -109,11 +109,13 @@ using this API. Restarts the app and installs the update after it has been downloaded. It should only be called after `update-downloaded` has been emitted. -**Note 1:** `autoUpdater.quitAndInstall()` will close all application windows -first and only emit `before-quit` event on `app` after that. This is different -from the normal quit event sequence. +Under the hood calling `autoUpdater.quitAndInstall()` will close all application +windows first, and automatically call `app.quit()` after all windows have been +closed. -**Note 2:** If you don't call `autoUpdater.quitAndInstall()` after `update-downloaded` event has been emitted then you will get the updated app on the next start/run of your app. +**Note** If the application is quit without calling this API after the +`update-downloaded` event has been emitted, the application will still be +replaced by the updated one on the next run. [squirrel-mac]: https://github.com/Squirrel/Squirrel.Mac [server-support]: https://github.com/Squirrel/Squirrel.Mac#server-support From 5d86da48c7c175795db0d4fe94e895ffd0fc35d0 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Tue, 19 Dec 2017 15:44:58 +0900 Subject: [PATCH 3/3] The missing : --- docs/api/auto-updater.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/auto-updater.md b/docs/api/auto-updater.md index d3b6d54756..8f4a4128b4 100644 --- a/docs/api/auto-updater.md +++ b/docs/api/auto-updater.md @@ -113,7 +113,7 @@ Under the hood calling `autoUpdater.quitAndInstall()` will close all application windows first, and automatically call `app.quit()` after all windows have been closed. -**Note** If the application is quit without calling this API after the +**Note:** If the application is quit without calling this API after the `update-downloaded` event has been emitted, the application will still be replaced by the updated one on the next run.