From 62249076008a49082471e87df6aef4f4a3829290 Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Tue, 11 Jan 2022 16:21:12 +0100 Subject: [feat] update process is not launched if game is currently running --- src/utils.js | 11 +++++++---- 1 file 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.') } -- cgit v1.2.3