From 2feb1e970fb3fcc37018146f20cfbc881984285f Mon Sep 17 00:00:00 2001 From: Bryce Gibson Date: Fri, 9 Apr 2021 08:26:41 +1000 Subject: [PATCH] Allow setting `follow` to `false`. The `|| true` meant this was always being set to true. --- src/tail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tail.js b/src/tail.js index e7ea8a1..7da5b7d 100644 --- a/src/tail.js +++ b/src/tail.js @@ -17,7 +17,7 @@ class Tail extends events.EventEmitter { this.absPath = path.dirname(this.filename); this.separator = (options.separator !== undefined) ? options.separator : /[\r]{0,1}\n/;// null is a valid param this.fsWatchOptions = options.fsWatchOptions || {}; - this.follow = options.follow || true; + this.follow = 'follow' in options ? options.follow : true; this.logger = options.logger || new devNull(); this.useWatchFile = options.useWatchFile || false; this.flushAtEOF = options.flushAtEOF || false;