Skip to content

Commit

Permalink
Move all without and with option handling together
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed May 31, 2020
1 parent ca5bf58 commit 5e47879
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bundler/lib/bundler/cli/install.rb
Expand Up @@ -12,8 +12,6 @@ def run

warn_if_root

normalize_groups

Bundler::SharedHelpers.set_env "RB_USER_INSTALL", "1" if Bundler::FREEBSD

# Disable color in deployment mode
Expand Down Expand Up @@ -165,6 +163,14 @@ def normalize_groups

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
Expand All @@ -191,13 +197,7 @@ def normalize_settings

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
Expand Down

0 comments on commit 5e47879

Please sign in to comment.