Permalink
Browse files

do not throw exception when the stdout stream aborts

this happens when one quits a "… | less" session
  • Loading branch information...
1 parent 65f5713 commit 648b9a1b161cde089a96848939b9045098d82170 @tyrasd committed Jan 9, 2014
Showing with 1 addition and 2 deletions.
  1. +1 −2 togpx
View
@@ -18,8 +18,6 @@ if (argv.version) {
return;
}
-var filename = argv._[0] || '';
-
(argv._.length ? fs.createReadStream(argv._[0]) : process.stdin).pipe(concat(convert));
function convert(data) {
@@ -28,4 +26,5 @@ function convert(data) {
JSON.parse(data)
)
);
+ process.stdout.on('error', function() {});
}

0 comments on commit 648b9a1

Please sign in to comment.