diff options
author | Remy Raes <contact@remyraes.com> | 2022-02-21 21:29:34 +0100 |
---|---|---|
committer | Remy Raes <contact@remyraes.com> | 2022-02-21 21:29:34 +0100 |
commit | 848772b53a47eeb6e921e2a186332dbc2a95aadf (patch) | |
tree | 9f6328e93de1bb58307dab52cb2668f4d1a67a75 /src/utils.js | |
parent | 23645e411d9015b5738381323c9151fb075a062f (diff) | |
download | Viper-848772b53a47eeb6e921e2a186332dbc2a95aadf.tar.gz Viper-848772b53a47eeb6e921e2a186332dbc2a95aadf.zip |
[fix] updates checking order
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/utils.js b/src/utils.js index 2ea91cd..336017f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -73,9 +73,9 @@ async function isGameRunning() { // // It uses isGameRunning() to ensure it doesn't run while the game is // running, as that may have all kinds of issues. -northstar_auto_updates: { +function handleNorthstarAutoUpdating() { if (!settings.autoupdate || !fs.existsSync("viper.json") || settings.gamepath.length === 0) { - break northstar_auto_updates; + return; } async function _checkForUpdates() { @@ -306,7 +306,11 @@ function updatevp(autoinstall) { } autoUpdater.on("error", (info) => {cli.exit(1)}); - autoUpdater.on("update-not-available", (info) => {cli.exit()}); + autoUpdater.on("update-not-available", (info) => { + // only check for N* updates if Viper itself has no updates + handleNorthstarAutoUpdating(); + cli.exit(); + }); autoUpdater.checkForUpdatesAndNotify(); } |