Ignore EPIPE errors in ldapjs-search

Fix mcavage/node-ldapjs#225
This commit is contained in:
Kyle P Davis 2014-09-23 09:01:09 -04:00 committed by Patrick Mooney
parent 5683bf036e
commit 6f58387688
1 changed files with 8 additions and 0 deletions

View File

@ -212,6 +212,14 @@ EntryFormatter.prototype.end = function end() {
var parsed;
process.stdout.on('error', function(err) {
if (err.code === 'EPIPE') {
process.exit(0);
} else {
throw err;
}
});
try {
parsed = parser.parse(process.argv);
} catch (e) {