Does electron-updater quitAndInstall() method emmit an installation progress event?
My client is asking for a progress bar while the update is installing but I don't see anything in the docs.
Note: I'm not referring to the update download progress (I already have that working).
Here is my code:
const { autoUpdater } = require("electron-updater");
const updater = (mainWindow) => {
autoUpdater.checkForUpdates();
autoUpdater.on("update-available", (data) => {
mainWindow.webContents.send("update-available", data);
});
ipcMain.handle("download-update", (event) => {
autoUpdater.downloadUpdate();
});
autoUpdater.on("download-progress", (data) => {
logger.info(data);
mainWindow.webContents.send("download-progress", data.percent);
});
autoUpdater.on("update-downloaded", (data) => {
mainWindow.webContents.send("update-downloaded", data);
});
ipcMain.handle("install-and-restart", () => {
// I'm looking for an installation progress event after I called this method.
autoUpdater.quitAndInstall(false, true);
});
};