Project

General

Profile

« Previous | Next » 

Revision b1db26c0

Added by Dmitri Dolguikh almost 11 years ago

  • ID b1db26c0b17b0944171527c2da1d2845918bb75f

Fixes #2714 - corrected IO#popen parameter on ruby 1.8.7
(cherry picked from commit 61394852e191756fc5eea0a92d581cf1dca39f21)

View differences:

lib/proxy/puppet.rb
def shell_command(cmd)
begin
c = IO.popen(cmd)
c = popen(cmd)
Process.wait(c.pid)
rescue Exception => e
logger.error("Exception '#{e}' when executing '#{cmd}'")
......
logger.warn("Non-null exit code when executing '#{cmd}'") if $?.exitstatus != 0
$?.exitstatus == 0
end
def popen(cmd)
RUBY_VERSION > "1.8.7" ?
IO.popen(cmd) :
IO.popen(cmd.join(' ')) # 1.8.7 note: this assumes that cli options are space-separated
end
end
end

Also available in: Unified diff