diff options
author | Minteck <contact@minteck.org> | 2022-02-12 22:10:44 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-02-12 22:10:44 +0100 |
commit | 8a3cc2a073bcf26599fa05d342dff148067325a1 (patch) | |
tree | 70e1725027afcd93ef4f5ad61a475f308a848db6 | |
parent | da1aae09e7fb4e29d40bcc56c88c62333fb77cf0 (diff) | |
download | twilight-8a3cc2a073bcf26599fa05d342dff148067325a1.tar.gz twilight-8a3cc2a073bcf26599fa05d342dff148067325a1.tar.bz2 twilight-8a3cc2a073bcf26599fa05d342dff148067325a1.zip |
Fix again
-rw-r--r-- | commands/upgrade.js | 6 |
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") { |