From 9b139d937f1ee83ea2f881f2ba754feb779e0129 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele <willieruemmele@gmail.com> Date: Fri, 1 Apr 2022 11:13:01 -0600 Subject: [PATCH] fix: use showCommandHelp not showHelp --- src/sfdxCommand.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/sfdxCommand.ts b/src/sfdxCommand.ts index 955fead..c3c32f0 100644 --- a/src/sfdxCommand.ts +++ b/src/sfdxCommand.ts @@ -281,7 +281,14 @@ export abstract class SfdxCommand extends Command { if (this.shouldEmitHelp()) { const Help = await loadHelpClass(this.config); const help = new Help(this.config, this.config.pjson.helpOptions); - await help.showHelp(this.argv); + try { + // @ts-ignore this.statics is of type SfdxCommand, which extends Command which it expects + await help.showCommandHelp(this.statics, []); + } catch { + // fail back to how it was + await help.showHelp(this.argv); + } + return this.exit(0); }