diff options
author | 0neGal <mail@0negal.com> | 2022-03-24 17:15:44 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2022-03-24 17:15:44 +0100 |
commit | 63fb961c1a3b5df509ee96711b6d489b40efb330 (patch) | |
tree | 75a1b27c8357ff9a1a88d13f85e5d2d6c98fc092 /src/index.js | |
parent | 9573c62bf1dfde501af4bd92854adc335faca68b (diff) | |
download | Viper-63fb961c1a3b5df509ee96711b6d489b40efb330.tar.gz Viper-63fb961c1a3b5df509ee96711b6d489b40efb330.zip |
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.
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 8 |
1 files changed, 6 insertions, 2 deletions
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(); } |