Fix command debug.

This commit is contained in:
Michael Kessler 2011-09-20 12:10:53 +02:00
parent 2fa0f7255a
commit 044100b7c3

View File

@ -241,13 +241,13 @@ module Guard
def debug_command_execution def debug_command_execution
Kernel.send(:alias_method, :original_system, :system) Kernel.send(:alias_method, :original_system, :system)
Kernel.send(:define_method, :system) do |command, *args| Kernel.send(:define_method, :system) do |command, *args|
::Guard::UI.debug 'Command execution: #{command} #{args.join(' ')}' ::Guard::UI.debug "Command execution: #{ command } #{ args.join(' ') }"
original_system command, *args original_system command, *args
end end
Kernel.send(:alias_method, :original_backtick, :'`') Kernel.send(:alias_method, :original_backtick, :'`')
Kernel.send(:define_method, :'`') do |command| Kernel.send(:define_method, :'`') do |command|
::Guard::UI.debug 'Command execution: #{command}' ::Guard::UI.debug "Command execution: #{ command }"
original_backtick command original_backtick command
end end
end end