summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2020-05-28 23:06:34 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-05 07:32:42 +0900
commitb2a460ea3e4abf0322c0a5475ce2d89fde46b4c2 (patch)
tree959431cb9a6456afae55c21014844686562075de /lib
parent9422162f71e0d0f04034293125f925086abbbaf9 (diff)
[rubygems/rubygems] Centralize `with` and `without` setting
https://github.com/rubygems/rubygems/commit/5e854722e2
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/install.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb
index 068046fdc3..893ed59cdf 100644
--- a/lib/bundler/cli/install.rb
+++ b/lib/bundler/cli/install.rb
@@ -150,20 +150,16 @@ module Bundler
check_for_group_conflicts_in_cli_options
- Bundler.settings.set_command_option :with, nil if options[:with] == []
- Bundler.settings.set_command_option :without, nil if options[:without] == []
-
with = options.fetch(:with, [])
with |= Bundler.settings[:with].map(&:to_s)
with -= options[:without] if options[:without]
+ with = nil if options[:with] == []
without = options.fetch(:without, [])
without |= Bundler.settings[:without].map(&:to_s)
without -= options[:with] if options[:with]
+ without = nil if options[:without] == []
- # 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, without
Bundler.settings.set_command_option :with, with
end