Don't call listen with empty directory list

Listen interprets an empty list of directories as "watch the current
directory". Since EventedFileUpdateChecker doesn't share these
semantics, we should not initialize listen if we end up with an empty
directory list.
This commit is contained in:
John Hawthorn 2019-06-03 17:53:18 -07:00
parent c926ca4628
commit c763be7c97
1 changed files with 4 additions and 1 deletions

View File

@ -108,7 +108,10 @@ module ActiveSupport
private
def boot!
normalize_dirs!
Listen.to(*@dtw, &method(:changed)).start
unless @dtw.empty?
Listen.to(*@dtw, &method(:changed)).start
end
end
def shutdown!