[前][次][番号順一覧][スレッド一覧]

ruby-changes:61506

From: David <ko1@a...>
Date: Fri, 5 Jun 2020 07:33:35 +0900 (JST)
Subject: [ruby-changes:61506] 6b7a0c0ca7 (master): [rubygems/rubygems] Move all `without` and `with` option handling together

https://git.ruby-lang.org/ruby.git/commit/?id=6b7a0c0ca7

From 6b7a0c0ca7102c2891b75cd6ef7429dd90d931c3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Thu, 28 May 2020 22:51:57 +0200
Subject: [rubygems/rubygems] Move all `without` and `with` option handling
 together

https://github.com/rubygems/rubygems/commit/5e47879330

diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index ecd4749..40ff470 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -12,8 +12,6 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/install.rb#L12
 
       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 https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/install.rb#L163
 
       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 https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/install.rb#L197
 
       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
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]