From b7b73eb0396b27fa5a1e164e6346124c7c179290 Mon Sep 17 00:00:00 2001 From: hardo Date: Fri, 24 Jul 2020 16:19:35 +0800 Subject: [PATCH] Fix help information not display the brief of modules --- src/core/command/help.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/command/help.ts b/src/core/command/help.ts index 44dab4c..e02fbb9 100644 --- a/src/core/command/help.ts +++ b/src/core/command/help.ts @@ -137,8 +137,10 @@ export class HelpInfo implements Printable { let module = require(path) as CommandModule; commandConstructor = module.default; brief = - commandConstructor && - (commandConstructor.brief || commandConstructor.description); + (commandConstructor && + (commandConstructor.brief || commandConstructor.description)) || + module.brief || + module.description; } if (existingItem && existingItem.group === groupIndex) {