class Bundler::GemHelper

def sh_with_code(cmd, &block)

def sh_with_code(cmd, &block)
  cmd += " 2>&1"
  outbuf = String.new
  Bundler.ui.debug(cmd)
  SharedHelpers.chdir(base) do
    outbuf = `#{cmd}`
    status = $?.exitstatus
    block.call(outbuf) if status.zero? && block
    [outbuf, status]
  end
end