diff options
author | 0neGal <mail@0negal.com> | 2021-12-29 00:00:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-29 00:00:27 +0100 |
commit | 9d5498708b1b7db82fae53b4c858de7e43f21c95 (patch) | |
tree | 0661e8e7702beb2a378a0c359e4976a5128bb6ce /src/utils.js | |
parent | 5ff7e1a8123e18951aff4643993a5b6296c409af (diff) | |
download | Viper-9d5498708b1b7db82fae53b4c858de7e43f21c95.tar.gz Viper-9d5498708b1b7db82fae53b4c858de7e43f21c95.zip |
removed updateInstalledVersion()
I'm not quite sure what the purpose of this function is considering we
only use it once, and there's not much reason to export it or anything.
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/utils.js b/src/utils.js index 3bad620..5ae535f 100644 --- a/src/utils.js +++ b/src/utils.js @@ -61,9 +61,6 @@ function getInstalledVersion() { return "unknown"; } } -function updateInstalledVersion(newTag) { - fs.writeFileSync(path.join(settings.gamepath, "ns_version.txt"), newTag); -} function update() { for (let i = 0; i < settings.excludes.length; i++) { @@ -81,7 +78,7 @@ function update() { headers: {"User-Agent": "Viper"}, url: "https://api.github.com/repos/R2Northstar/Northstar/releases/latest", }, (error, response, body) => { - const tag = body["tag_name"]; + var tag = body["tag_name"]; console.log("current version:", version); console.log("remote version:", tag); @@ -101,7 +98,7 @@ function update() { .on("finish", () => { console.log("Installation/Update finished!"); - updateInstalledVersion(tag); + fs.writeFileSync(path.join(settings.gamepath, "ns_version.txt"), tag); events.emit("updated"); |