From 78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4 Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Tue, 28 Dec 2021 23:24:32 +0100 Subject: [refactor] renaming getInstalledVersion method --- src/utils.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/utils.js b/src/utils.js index 13894a8..66c8644 100644 --- a/src/utils.js +++ b/src/utils.js @@ -52,9 +52,10 @@ function saveSettings() { fs.writeFileSync(app.getPath("appData") + "/viper.json", JSON.stringify({...settings})); } -function getNorthstarInstalledVersion() { - const configFilePath = app.getPath("appData") + "/viper.json"; - return JSON.parse(fs.readFileSync(configFilePath, "utf8"))['northstarVersion']; +function getInstalledVersion() { + return JSON.parse( + fs.readFileSync(app.getPath("appData") + "/viper.json", "utf8") + )['northstarVersion']; } function update() { @@ -66,7 +67,7 @@ function update() { } console.log("Checking for updates..."); - const version = getNorthstarInstalledVersion(); + const version = getInstalledVersion(); request({ json: true, -- cgit v1.2.3