Open zvictor opened 2 years ago
Hello @zvictor
Let me check I understood the scenario well.
Your file uses \r
as an end of line character. When that happens, the library "eats" the following lines.
Is this correct? Or have I misunderstood?
Yes, that's correct. Except that it's not the library, but actually node
itself!
That's what happens when I ask node to print the bad string from stackoverflow: https://app.warp.dev/block/Fg16AyIidLvFoeYgAljxp9
My scripts fail to print the content of the files that
tail
is reading from. As result, many lines simply do not appear in console. I am running macOS Monterey 12.5 (21G72).Doing some research I found this report that describes precisely my situation. I could also do some quite extensive debugging and confirmed that there is nothing wrong with
tail
. It's node that "eats" lines out when\r
is present.To workaround this issue I have set
separator: /\r|\n/,
and the problem is now gone. The question left here is: should we change the defaultseparator
value to better accommodate Mac users?