From 3bb33d94b47764d8ee8b6b7df0aef1573e55078d Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Sat, 8 Jan 2022 19:12:37 +0100 Subject: [feat] not checking for updates if settings.autoupdate is false --- src/utils.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/utils.js') 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.') } }, -- cgit v1.2.3