20 lines
792 B
Ruby
Raw Normal View History

2020-10-10 14:16:11 +02:00
# typed: true
# frozen_string_literal: true
2022-10-24 19:42:49 +01:00
# We trust base Ruby to provide what we need.
# Don't look into the user-installed sitedir, which may contain older versions of RubyGems.
require "rbconfig"
$LOAD_PATH.reject! { |path| path.start_with?(RbConfig::CONFIG["sitedir"]) }
2018-09-02 23:30:07 +02:00
2022-10-24 19:42:49 +01:00
require "pathname"
HOMEBREW_LIBRARY_PATH = Pathname(__dir__).parent.realpath.freeze
2018-09-02 23:30:07 +02:00
require_relative "../utils/gems"
2021-02-24 18:04:26 +00:00
Homebrew.setup_gem_environment!(setup_path: false)
2021-02-24 18:04:26 +00:00
$LOAD_PATH.push HOMEBREW_LIBRARY_PATH.to_s unless $LOAD_PATH.include?(HOMEBREW_LIBRARY_PATH.to_s)
require_relative "../vendor/bundle/bundler/setup"
$LOAD_PATH.unshift "#{HOMEBREW_LIBRARY_PATH}/vendor/bundle/#{RUBY_ENGINE}/#{Gem.ruby_api_version}/gems/" \
"bundler-#{Homebrew::HOMEBREW_BUNDLER_VERSION}/lib"
2021-02-24 18:04:26 +00:00
$LOAD_PATH.uniq!