aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commands/upgrade.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/upgrade.js b/commands/upgrade.js
index 93d906d..2eab887 100644
--- a/commands/upgrade.js
+++ b/commands/upgrade.js
@@ -89,6 +89,11 @@ 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;
+ }
+
if (os.platform() === "win32" && typeof pkg.executable.windows === "string") {
fs.writeFileSync(os.homedir() + "/.twilight/binaries/" + pkg.id + ".bat", pkg.executable.windows);
} else if (os.platform() === "linux" && typeof pkg.executable.linux === "string") {