diff options
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js index 655eee0..6069a46 100644 --- a/src/utils.js +++ b/src/utils.js @@ -76,7 +76,7 @@ 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. function handleNorthstarUpdating() { - if (!settings.autoupdate || !fs.existsSync("viper.json") || settings.gamepath.length === 0) { + if (! settings.nsupdate || ! fs.existsSync("viper.json") || settings.gamepath.length === 0) { return; } @@ -306,6 +306,13 @@ async function update() { function updatevp(autoinstall) { const { autoUpdater } = require("electron-updater"); + if (! autoUpdater.isUpdaterActive()) { + if (settings.nsupdate) { + handleNorthstarUpdating(); + } + return cli.exit(); + } + if (autoinstall) { autoUpdater.on("update-downloaded", (info) => { autoUpdater.quitAndInstall(); |