diff options
author | Alystrasz <contact@remyraes.com> | 2022-08-06 22:47:27 +0200 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2022-08-06 22:47:27 +0200 |
commit | 64fb444ad72bdba342a7345644a5b55d94c7f696 (patch) | |
tree | e58e97a96372e65b6c48020cc3a0d024783c0ff4 /src/utils.js | |
parent | c4e77a0f19804c94bc21c6d90dd3c49a37d4d5cb (diff) | |
download | Viper-64fb444ad72bdba342a7345644a5b55d94c7f696.tar.gz Viper-64fb444ad72bdba342a7345644a5b55d94c7f696.zip |
feat: prevent Northstar update and update download link text if no Internet
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils.js b/src/utils.js index e8d14cc..b5978b6 100644 --- a/src/utils.js +++ b/src/utils.js @@ -155,6 +155,7 @@ function handleNorthstarUpdating() { async function _checkForUpdates() { let localVersion = getNSVersion(); let distantVersion = await requests.getLatestNsVersion(); + if (distantVersion == false) return; console.log(lang("cli.autoupdates.checking")); // Checks if NS is outdated @@ -361,6 +362,10 @@ async function update() { const latestAvailableVersion = await requests.getLatestNsVersion(); console.log(latestAvailableVersion) + if (latestAvailableVersion == false) { + ipcMain.emit("ns-update-event", "cli.update.noInternet"); + return; + } // Makes sure it is not already the latest version if (version === latestAvailableVersion) { |