aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-02-12 22:10:44 +0100
committerMinteck <contact@minteck.org>2022-02-12 22:10:44 +0100
commit8a3cc2a073bcf26599fa05d342dff148067325a1 (patch)
tree70e1725027afcd93ef4f5ad61a475f308a848db6
parentda1aae09e7fb4e29d40bcc56c88c62333fb77cf0 (diff)
downloadtwilight-8a3cc2a073bcf26599fa05d342dff148067325a1.tar.gz
twilight-8a3cc2a073bcf26599fa05d342dff148067325a1.tar.bz2
twilight-8a3cc2a073bcf26599fa05d342dff148067325a1.zip
Fix again
-rw-r--r--commands/upgrade.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/upgrade.js b/commands/upgrade.js
index 2eab887..397adb6 100644
--- a/commands/upgrade.js
+++ b/commands/upgrade.js
@@ -89,9 +89,9 @@ async function processQueue() {
spinner.succeed("Extracting package... done");
console.log(" Size change: " + change);
- let exec = argv.package;
- if (typeof JSON.parse(fs.readFileSync(home + "/repository/" + dir + "/" + argv.package + ".json").toString()).execname === "string") {
- exec = JSON.parse(fs.readFileSync(home + "/repository/" + dir + "/" + argv.package + ".json").toString()).execname;
+ let exec = pkg.id;
+ if (typeof JSON.parse(fs.readFileSync(home + "/repository/" + dir + "/" + pkg.id + ".json").toString()).execname === "string") {
+ exec = JSON.parse(fs.readFileSync(home + "/repository/" + dir + "/" + pkg.id + ".json").toString()).execname;
}
if (os.platform() === "win32" && typeof pkg.executable.windows === "string") {