From 8a3cc2a073bcf26599fa05d342dff148067325a1 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sat, 12 Feb 2022 22:10:44 +0100 Subject: Fix again --- commands/upgrade.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'commands') 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") { -- cgit