class Bundler::GemHelper

def sh_with_code(cmd, &block)

def sh_with_code(cmd, &block)
  cmd << " 2>&1"
  outbuf = ''
  Bundler.ui.debug(cmd)
  Dir.chdir(base) {
    outbuf = `#{cmd}`
    if $? == 0
      block.call(outbuf) if block
    end
  }
  [outbuf, $?]
end