# File lib/puppet/util.rb, line 200
200:     def execpipe(command, failonfail = true)
201:         if respond_to? :debug
202:             debug "Executing '%s'" % command
203:         else
204:             Puppet.debug "Executing '%s'" % command
205:         end
206: 
207:         output = open("| #{command} 2>&1") do |pipe|
208:             yield pipe
209:         end
210: 
211:         if failonfail
212:             unless $? == 0
213:                 raise ExecutionFailure, output
214:             end
215:         end
216: 
217:         return output
218:     end