Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carriage Return (\r) is messing up Mac (not tail's fault) #159

Open
zvictor opened this issue Aug 16, 2022 · 2 comments
Open

Carriage Return (\r) is messing up Mac (not tail's fault) #159

zvictor opened this issue Aug 16, 2022 · 2 comments

Comments

@zvictor
Copy link

zvictor commented Aug 16, 2022

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 default separator value to better accommodate Mac users?

@lucagrulla
Copy link
Owner

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?

@zvictor
Copy link
Author

zvictor commented Aug 16, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants