lib/cocaine/command_line/runners/popen_runner.rb in cocaine-0.5.6 vs lib/cocaine/command_line/runners/popen_runner.rb in cocaine-0.5.7

- old
+ new

@@ -11,36 +11,16 @@ self.class.supported? end def call(command, env = {}, options = {}) with_modified_environment(env) do - IO.popen(env_command(command), "r", options) do |pipe| + IO.popen(command, "r", options) do |pipe| pipe.read end end end private - - def env_command(command) - windows_command(command) || java_command(command) || default_command(command) - end - - def windows_command(command) - if OS.windows? - command - end - end - - def java_command(command) - if OS.java? - "env #{command}" - end - end - - def default_command(command) - command - end def with_modified_environment(env, &block) ClimateControl.modify(env, &block) end end