From 63fb961c1a3b5df509ee96711b6d489b40efb330 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Thu, 24 Mar 2022 17:15:44 +0100 Subject: added --no-vp-updates This overwrites viper.json and disables Viper updates, this is useful when repackaging Viper for other formats we don't already support. --- src/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index 265e13d..752410e 100644 --- a/src/index.js +++ b/src/index.js @@ -56,7 +56,7 @@ function start() { ipcMain.on("savesettings", (event, obj) => {utils.saveSettings(obj)}) ipcMain.on("can-autoupdate", (event) => { - if (! require("electron-updater").autoUpdater.isUpdaterActive()) { + if (! require("electron-updater").autoUpdater.isUpdaterActive() || cli.hasParam("no-vp-updates")) { win.webContents.send("cant-autoupdate") } }) @@ -66,7 +66,11 @@ function start() { }); if (utils.settings.autoupdate) { - utils.updatevp(false) + if (cli.hasParam("no-vp-updates")) { + utils.handleNorthstarUpdating(); + } else { + utils.updatevp(false) + } } else { utils.handleNorthstarUpdating(); } -- cgit v1.2.3