aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author1024x22018-06-05 12:36:19 +0100
committerGitHub2018-06-05 12:36:19 +0100
commit7b638d58d99fa015adaae759696b88f9206fe297 (patch)
tree46afe518bd4eccb0b0e8fb34b9685d6a0c9cfc79
parentc3ff9f09612029c52b03f0578ddfa40d081bf94c (diff)
Update pkg93.js
-rw-r--r--pkg93.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg93.js b/pkg93.js
index c5567c9..83de03b 100644
--- a/pkg93.js
+++ b/pkg93.js
@@ -276,14 +276,15 @@ pkg93 <span style="color:#0f0">rm</span> <span style="color:#77f">kebab</span>
if (args.length > 2) {
cli.log("<b><span style='color:#f00'>ERR</span></b> No package specified.");
} else {
- var pkgInfo = JSON.parse(await pkg93.pkgInfo(args[1]));
+ var pkgInfo = await pkg93.pkgInfo(args[1]);
if (!pkgInfo) {
cli.log("<b><span style='color:#f00'>ERR</span></b> Either the package doesn't exist, or an error occoured.")
} else {
depends = pkgInfo.dependencies ? pkgInfo.dependencies.join(" , ") : "<i><span style='color:#444'>None!</span></i>";
+ description = pkgInfo.description ? pkgInfo.description : "<i><span style='color:#444'>None!</span></i>";
console.log(pkgInfo);
cli.log(`<b><u>${pkgInfo.name}</u></b>
-Description: ${pkgInfo.description}
+Description: ${description}
Dependencies: ${depends}`);
}
}