1 # frozen_string_literal: true
7 def initialize(options)
12 require_path_or_force unless options[:"dry-run"]
13 Bundler.load.clean(options[:"dry-run"])
18 def require_path_or_force
19 return unless Bundler.use_system_gems? && !options[:force]
20 raise InvalidOption, "Cleaning all the gems on your system is dangerous! " \
21 "If you're sure you want to remove every system gem not in this " \
22 "bundle, run `bundle clean --force`."