Skip to content
Myr

Merge pull request #960 from pRizz/improve-help-output

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

Add check for help output callback

authored by Tomoaki Abe · committed by GitHub · parents 52247fc, 6b4992c · 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
1138 unmodified lines
1139 cb = function(passthru) {1140 return passthru;1141 };1142 }1143 process.stdout.write(cb(this.helpInformation()));1143 const cbOutput = cb(this.helpInformation());1144 if (typeof cbOutput !== 'string' && !Buffer.isBuffer(cbOutput)) {1145 throw new Error('outputHelp callback must return a string or a Buffer');1146 }1147 process.stdout.write(cbOutput);1148 this.emit('--help');1149};11501151/**
82 unmodified lines