aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-06-03 17:53:18 -0700
committerJohn Hawthorn <john@hawthorn.email>2019-06-03 18:57:36 -0700
commitc763be7c97973fa0dd296fd895d4704dcd4734b1 (patch)
tree92d41d45cb43af76112e669e4674c27493ca25a3 /activesupport/lib
parentc926ca46280aee795b98206dd0707a96b9423cc5 (diff)
downloadrails-c763be7c97973fa0dd296fd895d4704dcd4734b1.tar.gz
rails-c763be7c97973fa0dd296fd895d4704dcd4734b1.tar.bz2
rails-c763be7c97973fa0dd296fd895d4704dcd4734b1.zip
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.
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/evented_file_update_checker.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/evented_file_update_checker.rb b/activesupport/lib/active_support/evented_file_update_checker.rb
index 84caa00b58..5a79822c49 100644
--- a/activesupport/lib/active_support/evented_file_update_checker.rb
+++ b/activesupport/lib/active_support/evented_file_update_checker.rb
@@ -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!