Add more logging in update scenarios
This commit is contained in:
parent
7c1f186c05
commit
4fc7c69a73
3 changed files with 5 additions and 3 deletions
|
@ -265,6 +265,7 @@ export abstract class Updater {
|
|||
|
||||
const mainWindow = this.getMainWindow();
|
||||
if (mainWindow) {
|
||||
logger.info('downloadAndInstall: showing update dialog...');
|
||||
mainWindow.webContents.send('show-update-dialog', DialogType.Update, {
|
||||
version: this.version,
|
||||
});
|
||||
|
|
|
@ -24,6 +24,7 @@ export class MacOSUpdater extends Updater {
|
|||
protected async installUpdate(updateFilePath: string): Promise<void> {
|
||||
const { logger } = this;
|
||||
|
||||
logger.info('downloadAndInstall: handing download to electron...');
|
||||
try {
|
||||
await this.handToAutoUpdate(updateFilePath);
|
||||
} catch (error) {
|
||||
|
@ -41,10 +42,9 @@ export class MacOSUpdater extends Updater {
|
|||
|
||||
// At this point, closing the app will cause the update to be installed automatically
|
||||
// because Squirrel has cached the update file and will do the right thing.
|
||||
logger.info('downloadAndInstall: showing update dialog...');
|
||||
|
||||
this.setUpdateListener(async () => {
|
||||
logger.info('performUpdate: calling quitAndInstall...');
|
||||
logger.info('downloadAndInstall: restarting...');
|
||||
markShouldQuit();
|
||||
autoUpdater.quitAndInstall();
|
||||
});
|
||||
|
|
|
@ -47,8 +47,8 @@ export class WindowsUpdater extends Updater {
|
|||
protected async installUpdate(updateFilePath: string): Promise<void> {
|
||||
const { logger } = this;
|
||||
|
||||
logger.info('downloadAndInstall: showing dialog...');
|
||||
this.setUpdateListener(async () => {
|
||||
logger.info('downloadAndInstall: installing...');
|
||||
try {
|
||||
await this.install(updateFilePath);
|
||||
this.installing = true;
|
||||
|
@ -58,6 +58,7 @@ export class WindowsUpdater extends Updater {
|
|||
throw error;
|
||||
}
|
||||
|
||||
logger.info('downloadAndInstall: restarting...');
|
||||
markShouldQuit();
|
||||
app.quit();
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue