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();
|
const mainWindow = this.getMainWindow();
|
||||||
if (mainWindow) {
|
if (mainWindow) {
|
||||||
|
logger.info('downloadAndInstall: showing update dialog...');
|
||||||
mainWindow.webContents.send('show-update-dialog', DialogType.Update, {
|
mainWindow.webContents.send('show-update-dialog', DialogType.Update, {
|
||||||
version: this.version,
|
version: this.version,
|
||||||
});
|
});
|
||||||
|
|
|
@ -24,6 +24,7 @@ export class MacOSUpdater extends Updater {
|
||||||
protected async installUpdate(updateFilePath: string): Promise<void> {
|
protected async installUpdate(updateFilePath: string): Promise<void> {
|
||||||
const { logger } = this;
|
const { logger } = this;
|
||||||
|
|
||||||
|
logger.info('downloadAndInstall: handing download to electron...');
|
||||||
try {
|
try {
|
||||||
await this.handToAutoUpdate(updateFilePath);
|
await this.handToAutoUpdate(updateFilePath);
|
||||||
} catch (error) {
|
} 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
|
// 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.
|
// because Squirrel has cached the update file and will do the right thing.
|
||||||
logger.info('downloadAndInstall: showing update dialog...');
|
|
||||||
|
|
||||||
this.setUpdateListener(async () => {
|
this.setUpdateListener(async () => {
|
||||||
logger.info('performUpdate: calling quitAndInstall...');
|
logger.info('downloadAndInstall: restarting...');
|
||||||
markShouldQuit();
|
markShouldQuit();
|
||||||
autoUpdater.quitAndInstall();
|
autoUpdater.quitAndInstall();
|
||||||
});
|
});
|
||||||
|
|
|
@ -47,8 +47,8 @@ export class WindowsUpdater extends Updater {
|
||||||
protected async installUpdate(updateFilePath: string): Promise<void> {
|
protected async installUpdate(updateFilePath: string): Promise<void> {
|
||||||
const { logger } = this;
|
const { logger } = this;
|
||||||
|
|
||||||
logger.info('downloadAndInstall: showing dialog...');
|
|
||||||
this.setUpdateListener(async () => {
|
this.setUpdateListener(async () => {
|
||||||
|
logger.info('downloadAndInstall: installing...');
|
||||||
try {
|
try {
|
||||||
await this.install(updateFilePath);
|
await this.install(updateFilePath);
|
||||||
this.installing = true;
|
this.installing = true;
|
||||||
|
@ -58,6 +58,7 @@ export class WindowsUpdater extends Updater {
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info('downloadAndInstall: restarting...');
|
||||||
markShouldQuit();
|
markShouldQuit();
|
||||||
app.quit();
|
app.quit();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue