class Bundler::GemHelper

def sh_with_code(cmd, &block)

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