Skip to content

Commit

Permalink
Install app after auto updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alanhamlett committed Oct 21, 2024
1 parent b4e7d4e commit 03275b9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions electron/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ process.env.ELECTRON_DIR = app.isPackaged

const isMacOS = process.platform === "darwin";

autoUpdater.autoDownload = false;
autoUpdater.autoDownload = true;
autoUpdater.autoInstallOnAppQuit = true;
autoUpdater.autoRunAppAfterInstall = false;
autoUpdater.autoRunAppAfterInstall = true;

autoUpdater.on("checking-for-update", () => {
Logging.instance().log("Checking for update");
Expand All @@ -60,6 +60,7 @@ autoUpdater.on("update-downloaded", (res) => {
Logging.instance().log(
`Update Downloaded. Downloaded file: ${res.downloadedFile}, Version: ${res.version}, `,
);
autoUpdater.quitAndInstall();
});
autoUpdater.on("update-not-available", () => {
Logging.instance().log("Update not available");
Expand Down

0 comments on commit 03275b9

Please sign in to comment.