# File lib/puppet/util.rb, line 215 215: def execpipe(command, failonfail = true) 216: if respond_to? :debug 217: debug "Executing '#{command}'" 218: else 219: Puppet.debug "Executing '#{command}'" 220: end 221: 222: output = open("| #{command} 2>&1") do |pipe| 223: yield pipe 224: end 225: 226: if failonfail 227: unless $CHILD_STATUS == 0 228: raise ExecutionFailure, output 229: end 230: end 231: 232: output 233: end