module Gem::BundlerVersionFinder

def self.lockfile_contents

def self.lockfile_contents
  gemfile = ENV["BUNDLE_GEMFILE"]
  gemfile = nil if gemfile&.empty?
  unless gemfile
    begin
      Gem::Util.traverse_parents(Dir.pwd) do |directory|
        next unless gemfile = Gem::GEM_DEP_FILES.find {|f| File.file?(f) }
        gemfile = File.join directory, gemfile
        break
      end
    rescue Errno::ENOENT
      return
    end
  end
  return unless gemfile
  lockfile = case gemfile
             when "gems.rb" then "gems.locked"
             else "#{gemfile}.lock"
  end
  return unless File.file?(lockfile)
  File.read(lockfile)
end