File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -22,14 +22,14 @@ def write_file(path, content)
2222 File . open ( path , "wb" ) do |file |
2323 file . write ( content )
2424 end
25- site . process
25+ conditionally_process_site
2626 end
2727
2828 # Delete the file at the given path
2929 def delete_file ( path )
3030 Jekyll . logger . debug "DELETING:" , path
3131 FileUtils . rm_f sanitized_path ( path )
32- site . process
32+ conditionally_process_site
3333 end
3434
3535 def delete_file_without_process ( path )
@@ -39,6 +39,10 @@ def delete_file_without_process(path)
3939
4040 private
4141
42+ def conditionally_process_site
43+ site . process unless site . config [ 'watch' ] # to avoid race condition between jekyll watch and this
44+ end
45+
4246 def ensure_requested_file
4347 ensure_file ( requested_file )
4448 end
You can’t perform that action at this time.
0 commit comments