Skip to content
Myr

Add check for help output callback

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Peter Ryszkiewicz · committed by Peter Ryszkiewicz · parent 3598303 · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • other:+5 added−1 removed

1 file+5 added−1 removed

modified:index.js+5 added-1 removed
1136 unmodified lines
1137 cb = function(passthru) {1138 return passthru;1139 };1140 }1141 process.stdout.write(cb(this.helpInformation()));1141 const cbOutput = cb(this.helpInformation());1142 if (!cbOutput) {1143 throw new Error('outputHelp callback must return a string or a Buffer');1144 }1145 process.stdout.write(cbOutput);1146 this.emit('--help');1147};11481149/**
82 unmodified lines