Skip to content
Myr

Wait for the close event, write our help information, then give other events a chance to write something, and then ask to destroySoon the stdout stream.

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

authored by Jerry Hamlet · committed by Tj Holowaychuk · parent fca696a · Browse files · 1 file+3 added−2 removed
This commit

State

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

Trailers

  • Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:lib/commander.js+3 added-2 removed
900 unmodified lines
901 */902903exports.option('-h, --help', 'output usage information');904exports.on('help', function(){905 process.stdout.on("drain", function () {906 process.exit(0);905 process.stdout.on("close", function () {906 process.exit(0);907 });908 process.stdout.write(this.helpInformation());909 exports.emit('--help');910 process.stdout.destroySoon();911});