lucagrulla / node-tail

The zero dependency Node.js module for tailing a file
https://www.lucagrulla.com/node-tail/
MIT License
467 stars 76 forks source link

fixes issue where empty files with nLines options would hang forever #167

Closed MrDiggles2 closed 1 year ago

MrDiggles2 commented 1 year ago

Fixes issue from https://github.com/lucagrulla/node-tail/pull/162

I didn't include a base case in the new nLines logic causing an infinite loop on empty files. This PR fixes this and adds a test case.

Apologies for this! I should have tested for this earlier.