summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-05-28 22:51:57 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commit6b7a0c0ca7102c2891b75cd6ef7429dd90d931c3 (patch)
tree003d9f6ed21dc049bd534df585de5330053811eb /lib
parent052d66050a8524f70d90223c015d5a0452bfc88b (diff)
[rubygems/rubygems] Move all `without` and `with` option handling together
https://github.com/rubygems/rubygems/commit/5e47879330
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/install.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index ecd474971d..40ff4709af 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -12,8 +12,6 @@ module Bundler
warn_if_root
- normalize_groups
-
Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD
# Disable color in deployment mode
@@ -165,6 +163,14 @@ module Bundler
options[:with] = with
options[:without] = without
+
+ unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
+ # need to nil them out first to get around validation for backwards compatibility
+ Bundler.settings.set_command_option :without, nil
+ Bundler.settings.set_command_option :with, nil
+ Bundler.settings.set_command_option :without, options[:without] - options[:with]
+ Bundler.settings.set_command_option :with, options[:with]
+ end
end
def normalize_settings
@@ -191,13 +197,7 @@ module Bundler
Bundler.settings.set_command_option_if_given :clean, options["clean"]
- unless Bundler.settings[:without] == options[:without] && Bundler.settings[:with] == options[:with]
- # need to nil them out first to get around validation for backwards compatibility
- Bundler.settings.set_command_option :without, nil
- Bundler.settings.set_command_option :with, nil
- Bundler.settings.set_command_option :without, options[:without] - options[:with]
- Bundler.settings.set_command_option :with, options[:with]
- end
+ normalize_groups
options[:force] = options[:redownload]
end