From 6b7a0c0ca7102c2891b75cd6ef7429dd90d931c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 28 May 2020 22:51:57 +0200 Subject: [PATCH] [rubygems/rubygems] Move all `without` and `with` option handling together https://github.com/rubygems/rubygems/commit/5e47879330 --- lib/bundler/cli/install.rb | 18 +++++++++--------- 1 file 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