method

sh_with_code

ruby latest stable - Class: Bundler::GemHelper

Method not available on this version

This method is only available on newer versions. The first available version (v2_6_3) is shown here.

sh_with_code(cmd, &block)
protected

No documentation available.

# File lib/bundler/gem_helper.rb, line 182
    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