Skip to content

Commit 1d8a054

Browse files
committed
fix: use global helpCallback
1 parent 1f5a677 commit 1d8a054

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Command.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ class Command {
125125

126126
outputHelp() {
127127
const { bin, commands } = this.cli
128-
const { versionNumber, options: globalOptions } = this.cli.globalCommand
128+
const {
129+
versionNumber,
130+
options: globalOptions,
131+
helpCallback
132+
} = this.cli.globalCommand
129133

130134
const sections: HelpSection[] = [
131135
{
@@ -206,8 +210,8 @@ class Command {
206210
})
207211
}
208212

209-
if (this.helpCallback) {
210-
this.helpCallback(sections)
213+
if (helpCallback) {
214+
helpCallback(sections)
211215
}
212216

213217
console.log(

0 commit comments

Comments
 (0)