mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Upgrade the Listen gem
This commit is contained in:
@@ -179,12 +179,14 @@ class Autospec::Manager
|
||||
puts "@@@@@@@@@ Listen to #{path}/#{watch} #{options}" if @debug
|
||||
Thread.new do
|
||||
begin
|
||||
Listen.to("#{path}/#{watch}", options) do |modified, added, _|
|
||||
listener = Listen.to("#{path}/#{watch}", options) do |modified, added, _|
|
||||
paths = [modified, added].flatten
|
||||
paths.compact!
|
||||
paths.map!{|long| long[(path.length+1)..-1]}
|
||||
process_change(paths)
|
||||
end
|
||||
listener.start
|
||||
sleep
|
||||
rescue => e
|
||||
puts "FAILED to listen on changes to #{path}/#{watch}"
|
||||
puts e
|
||||
|
||||
Reference in New Issue
Block a user