Merge pull request #61 from andresol/master

Fix for tail'ing over network
pull/65/head
Maciej Winnicki 2016-01-25 12:54:52 +01:00
commit b025ff6dbd
1 changed files with 4 additions and 3 deletions

View File

@ -25,9 +25,10 @@ var Tail = function (path, options) {
}
tail.stderr.on('data', function (data) {
//if there is any error then display it in the console and then kill the tail.
console.error(data.toString());
process.exit();
//if there is any important errors then display it in the console. Tail will keep running.
if (data.toString().indexOf('file truncated') === -1) { // File kan be truncated over network.
console.error(data.toString());
}
});
tail.stdout.on('data', function (data) {