Skip to content
This repository has been archived by the owner on Jul 10, 2023. It is now read-only.

Commit

Permalink
fix: use showCommandHelp not showHelp
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieRuemmele committed Apr 1, 2022
1 parent ae4b4a9 commit 9b139d9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sfdxCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9b139d9

Please sign in to comment.