aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-01-08 19:12:37 +0100
committerAlystrasz <contact@remyraes.com>2022-01-08 19:12:37 +0100
commit3bb33d94b47764d8ee8b6b7df0aef1573e55078d (patch)
treeeee4be9250d541bcf212ae78a9a11c6f098ad075
parente8fcdcd303fd0443c0677d9f1347c8fd3a8aee1b (diff)
downloadViper-3bb33d94b47764d8ee8b6b7df0aef1573e55078d.tar.gz
Viper-3bb33d94b47764d8ee8b6b7df0aef1573e55078d.zip
[feat] not checking for updates if settings.autoupdate is false
-rw-r--r--src/utils.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/utils.js b/src/utils.js
index 38aaf85..c06aca1 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -35,15 +35,19 @@ if (fs.existsSync("viper.json")) {
}
-// auto-updates
-{
+northstar_auto_updates: {
+ if (!settings.autoupdate) break northstar_auto_updates;
+
setInterval(async _ => {
const localVersion = getNSVersion();
const distantVersion = await requests.getLatestNsVersion();
+ console.log('Checking for Northstar updates...');
if (localVersion !== distantVersion) {
- console.log('Northstar update available');
+ console.log('Northstar update available! Launching update process.');
update();
+ } else {
+ console.log('No Northstar update available.')
}
},