From 332ecb0ad1fd5cda138a36cc40891d78517d1fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 28 May 2020 22:38:04 +0200 Subject: [rubygems/rubygems] Fix `bundle install` unintentionally saving configuration Even if no explicit flags were passed to it. https://github.com/rubygems/rubygems/commit/0598cbb68c --- lib/bundler/cli/install.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'lib') diff --git a/lib/bundler/cli/install.rb b/lib/bundler/cli/install.rb index 40ff4709af..dcd8d7cf7d 100644 --- a/lib/bundler/cli/install.rb +++ b/lib/bundler/cli/install.rb @@ -164,13 +164,11 @@ 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 + # 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 def normalize_settings @@ -197,7 +195,7 @@ module Bundler Bundler.settings.set_command_option_if_given :clean, options["clean"] - normalize_groups + normalize_groups if options[:without] || options[:with] options[:force] = options[:redownload] end -- cgit v1.2.3