class Bundler::CLI

def initialize(*args)

def initialize(*args)
  super
  current_cmd = args.last[:current_command].name
  custom_gemfile = options[:gemfile] || Bundler.settings[:gemfile]
  ENV['BUNDLE_GEMFILE']   = File.expand_path(custom_gemfile) if custom_gemfile
  Bundler::Retry.attempts = options[:retry] || Bundler.settings[:retry] || Bundler::Retry::DEFAULT_ATTEMPTS
  Bundler.rubygems.ui = UI::RGProxy.new(Bundler.ui)
  auto_install if AUTO_INSTALL_CMDS.include?(current_cmd)
rescue UnknownArgumentError => e
  raise InvalidOption, e.message
ensure
  self.options ||= {}
  Bundler.ui = UI::Shell.new(options)
  Bundler.ui.level = "debug" if options["verbose"]
end