# File lib/bundler/gem_helper.rb, line 174 def sh_with_code(cmd, &block) cmd << " 2>&1" outbuf = "" Bundler.ui.debug(cmd) SharedHelpers.chdir(base) do outbuf = `#{cmd}` block.call(outbuf) if $? == 0 && block end [outbuf, $?] end