1 # frozen_string_literal: true
7 def initialize(options)
12 Bundler.ui.level = "warn" if options[:quiet]
13 Bundler.settings.set_command_option_if_given :path, options[:path]
14 Bundler.settings.set_command_option_if_given :cache_path, options["cache-path"]
19 # TODO: move cache contents here now that all bundles are locked
20 custom_path = Bundler.settings[:path] if options[:path]
22 Bundler.settings.temporary(cache_all_platforms: options["all-platforms"]) do
23 Bundler.load.cache(custom_path)
30 require_relative "install"
31 options = self.options.dup
32 options["local"] = false if Bundler.settings[:cache_all_platforms]
33 options["no-cache"] = true
34 Bundler::CLI::Install.new(options).run
38 all = options.fetch(:all, Bundler.feature_flag.cache_all? || nil)
40 Bundler.settings.set_command_option_if_given :cache_all, all