diff options
author | Alystrasz <contact@remyraes.com> | 2021-12-28 23:24:32 +0100 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2021-12-28 23:24:32 +0100 |
commit | 78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4 (patch) | |
tree | e13e0ba6c6c39f23c9f89264342c552a66ef65cf /src | |
parent | 68e268303778e7b6d01ff37c4996b3b1c2ea7ead (diff) | |
download | Viper-78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4.tar.gz Viper-78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4.zip |
[refactor] renaming getInstalledVersion method
Diffstat (limited to 'src')
-rw-r--r-- | src/utils.js | 9 |
1 files changed, 5 insertions, 4 deletions
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, |