diff options
Diffstat (limited to 'commands/upgrade.js')
-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") { |