Added a debug message when running run_on_change
So the debug mode is a little more useful... Also added timestamp in debug print
This commit is contained in:
parent
76c2977b67
commit
a318e03ad1
@ -43,7 +43,10 @@ module Guard
|
|||||||
def run_on_change_for_all_guards(files)
|
def run_on_change_for_all_guards(files)
|
||||||
guards.each do |guard|
|
guards.each do |guard|
|
||||||
paths = Watcher.match_files(guard, files)
|
paths = Watcher.match_files(guard, files)
|
||||||
supervised_task(guard, :run_on_change, paths) unless paths.empty?
|
unless paths.empty?
|
||||||
|
UI.debug "#{guard.class.name}#run_on_change with #{paths.inspect}"
|
||||||
|
supervised_task(guard, :run_on_change, paths)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Reparse the whole directory to catch new files modified during the guards run
|
# Reparse the whole directory to catch new files modified during the guards run
|
||||||
|
@ -26,7 +26,7 @@ module Guard
|
|||||||
def debug(message, options = {})
|
def debug(message, options = {})
|
||||||
unless ENV["GUARD_ENV"] == "test"
|
unless ENV["GUARD_ENV"] == "test"
|
||||||
reset_line if options[:reset]
|
reset_line if options[:reset]
|
||||||
puts "DEBUG: #{message}" if ::Guard.options && ::Guard.options[:debug]
|
puts "DEBUG (#{Time.now.strftime('%T')}): #{message}" if ::Guard.options && ::Guard.options[:debug]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user