Permalink
Browse files

Fix issue with watching (auto-regeneration) continuously running if d…

…estination is not '_site'. #457.
  • Loading branch information...
1 parent a22527c commit 7457cbae2544b0b85beb118e3ca9b62bcb44d7f1 @parkr parkr committed Feb 21, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/jekyll/command.rb
  2. +1 −1 lib/jekyll/commands/build.rb
View
@@ -1,9 +1,9 @@
module Jekyll
class Command
- def self.globs(source)
+ def self.globs(source, destination)
Dir.chdir(source) do
dirs = Dir['*'].select { |x| File.directory?(x) }
- dirs -= ['_site']
+ dirs -= [destination]
dirs = dirs.map { |x| "#{x}/**/*" }
dirs += ['*']
end
@@ -56,7 +56,7 @@ def self.watch(site, options)
dw = DirectoryWatcher.new(source)
dw.interval = 1
- dw.glob = self.globs(source)
+ dw.glob = self.globs(source, destination)
dw.add_observer do |*args|
t = Time.now.strftime("%Y-%m-%d %H:%M:%S")

3 comments on commit 7457cba

@parkr if destination is _site, also known as the default, this commit breaks it. I found this commit by running

git bisect start
git bisect good 151ec1a
git bisect bad master
Owner

parkr replied Mar 16, 2013

Hm, yeah, it looks like it just keeps going. Is this when you just use the programmatic default, or when you specify _site in your _config.yml?

Owner

parkr replied Mar 16, 2013

I wrote some tests and fixed it up a bit: #862.

Please sign in to comment.