Sha256: 2c05d2af3021594e3e3faa4d072da02fe1b6d0bbf9bde89bb72345656fd4cd55

Contents?: true

Size: 963 Bytes

Versions: 108

Compression:

Stored size: 963 Bytes

Contents

# frozen_string_literal: true

require_relative "shared_helpers"

if Bundler::SharedHelpers.in_bundle?
  require_relative "../bundler"

  if STDOUT.tty? || ENV["BUNDLER_FORCE_TTY"]
    begin
      Bundler.ui.silence { Bundler.setup }
    rescue Bundler::BundlerError => e
      Bundler.ui.error e.message
      Bundler.ui.warn e.backtrace.join("\n") if ENV["DEBUG"]
      if e.is_a?(Bundler::GemNotFound)
        suggested_cmd = "bundle install"
        original_gemfile = Bundler.original_env["BUNDLE_GEMFILE"]
        suggested_cmd += " --gemfile #{original_gemfile}" if original_gemfile
        Bundler.ui.warn "Run `#{suggested_cmd}` to install missing gems."
      end
      exit e.status_code
    end
  else
    Bundler.ui.silence { Bundler.setup }
  end

  # We might be in the middle of shelling out to rubygems
  # (RUBYOPT=-rbundler/setup), so we need to give rubygems the opportunity of
  # not being silent.
  Gem::DefaultUserInteraction.ui = nil
end

Version data entries

108 entries across 108 versions & 4 rubygems

Version Path
rubygems-update-3.4.21 bundler/lib/bundler/setup.rb
bundler-2.4.21 lib/bundler/setup.rb
rubygems-update-3.4.20 bundler/lib/bundler/setup.rb
bundler-2.4.20 lib/bundler/setup.rb
rubygems-update-3.4.19 bundler/lib/bundler/setup.rb
bundler-2.4.19 lib/bundler/setup.rb
rubygems-update-3.4.18 bundler/lib/bundler/setup.rb
bundler-2.4.18 lib/bundler/setup.rb
rubygems-update-3.4.17 bundler/lib/bundler/setup.rb
bundler-2.4.17 lib/bundler/setup.rb
rubygems-update-3.4.16 bundler/lib/bundler/setup.rb
bundler-2.4.16 lib/bundler/setup.rb
rubygems-update-3.4.15 bundler/lib/bundler/setup.rb
bundler-2.4.15 lib/bundler/setup.rb
rubygems-update-3.4.14 bundler/lib/bundler/setup.rb
bundler-2.4.14 lib/bundler/setup.rb
rubygems-update-3.4.13 bundler/lib/bundler/setup.rb
bundler-2.4.13 lib/bundler/setup.rb
rubygems-update-3.4.12 bundler/lib/bundler/setup.rb
bundler-2.4.12 lib/bundler/setup.rb