When the 'beginAt' option is set to 'end', before the file grows for the first time, no matter how much that file gets truncated, it will not be detected and all new data is completely skipped until the file grows beyond its original size again.
As far as I can tell, you need to add this.lastSize = stat.size; somewhere inside this if-block:
|
if(this.firstRead && (this.opts.beginAt == 'end')) { |
When the 'beginAt' option is set to 'end', before the file grows for the first time, no matter how much that file gets truncated, it will not be detected and all new data is completely skipped until the file grows beyond its original size again.
As far as I can tell, you need to add
this.lastSize = stat.size;somewhere inside this if-block:tail-stream/index.js
Line 222 in d460a2b