lib/awestruct/handlers/base_handler.rb in awestruct-0.4.7 vs lib/awestruct/handlers/base_handler.rb in awestruct-0.4.8

- old
+ new

@@ -95,11 +95,11 @@ chain = [ self ] chain += @delegate.to_chain if @delegate chain.flatten end - def execute_shell(command, input=nil) - Open3.popen3(Shellwords.escape( command )) do |stdin, stdout, _| + def execute_shell(command, input=nil, escape=true) + Open3.popen3(escape ? Shellwords.escape( command ) : command) do |stdin, stdout, _| stdin.puts input unless input.nil? stdin.close out = stdout.read end rescue Errno::EPIPE