aboutsummaryrefslogtreecommitdiff
path: root/src/utils.js
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-01-11 16:21:12 +0100
committerAlystrasz <contact@remyraes.com>2022-01-11 16:21:12 +0100
commit62249076008a49082471e87df6aef4f4a3829290 (patch)
treefe57dbd44c637477054a5612d7a246d6f4e0ddc7 /src/utils.js
parent6017ba7c3e73dba077b7ac4d4de392705f92c505 (diff)
downloadViper-62249076008a49082471e87df6aef4f4a3829290.tar.gz
Viper-62249076008a49082471e87df6aef4f4a3829290.zip
[feat] update process is not launched if game is currently running
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/utils.js b/src/utils.js
index 7256444..014c601 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -64,15 +64,18 @@ northstar_auto_updates: {
break northstar_auto_updates;
async function _checkForUpdates() {
- console.log(await _isGameRunning());
-
const localVersion = getNSVersion();
const distantVersion = await requests.getLatestNsVersion();
console.log('Checking for Northstar updates...');
if (localVersion !== distantVersion) {
- console.log('Northstar update available! Launching update process.');
- update();
+ console.log('Northstar update available!');
+ if (await _isGameRunning()) {
+ console.log('Not installing update since game is running.');
+ } else {
+ console.log('Launching update process.');
+ update();
+ }
} else {
console.log('No Northstar update available.')
}