Skip to content
Myr

Wait till STDOUT stream is drained before exiting the process.

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 d1491e4 · Browse files · 1 file+3 added−1 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−1 removed

  • other:+3 added−1 removed

1 file+3 added−1 removed

modified:lib/commander.js+3 added-1 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);907 });908 process.stdout.write(this.helpInformation());909 exports.emit('--help');907 process.exit(0);910});