Comparing version 1.0.3 to 1.0.4
@@ -17,7 +17,12 @@ #! /usr/bin/env node | ||
stdin.on('error', (err) => console.error('Error on stdin:', err)); | ||
stdout.on('error', (err) => console.error('Error on stdout:', err)); | ||
fileStream.on('error', (err) => console.error('Error on fileStream:', err)); | ||
function errHandler(name, err) { | ||
console.error(name, err); | ||
process.exit(1); | ||
} | ||
stdin.on('error', (err) => errHandler('stdin', err)); | ||
stdout.on('error', (err) => errHandler('stdout', err)); | ||
fileStream.on('error', (err) => errHandler('fileStream', err)); | ||
stdin.pipe(stdout); | ||
stdin.pipe(fileStream); |
{ | ||
"name": "justtee", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Just tee, a minimal replacement for unix tee", | ||
@@ -5,0 +5,0 @@ "preferGlobal": true, |
2069
31