aboutsummaryrefslogtreecommitdiff
path: root/src/utils.js
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2021-12-28 23:24:32 +0100
committerAlystrasz <contact@remyraes.com>2021-12-28 23:24:32 +0100
commit78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4 (patch)
treee13e0ba6c6c39f23c9f89264342c552a66ef65cf /src/utils.js
parent68e268303778e7b6d01ff37c4996b3b1c2ea7ead (diff)
downloadViper-78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4.tar.gz
Viper-78888b8465f833a8dd8ba00d3c34b21ba8dd6cb4.zip
[refactor] renaming getInstalledVersion method
Diffstat (limited to 'src/utils.js')
-rw-r--r--src/utils.js9
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,