diff options
-rw-r--r-- | lib/bundler/cli/outdated.rb | 4 | ||||
-rw-r--r-- | lib/bundler/definition.rb | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb index 5f065654b1..892c29c4d2 100644 --- a/lib/bundler/cli/outdated.rb +++ b/lib/bundler/cli/outdated.rb @@ -220,12 +220,10 @@ module Bundler def check_for_deployment_mode! return unless Bundler.frozen_bundle? - suggested_command = if Bundler.settings.locations("frozen")[:global] + suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any? "bundle config unset frozen" elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any? "bundle config unset deployment" - else - "bundle install --no-deployment" end raise ProductionError, "You are trying to check outdated gems in " \ "deployment mode. Run `bundle outdated` elsewhere.\n" \ diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb index 40f11ff339..df87358ac8 100644 --- a/lib/bundler/definition.rb +++ b/lib/bundler/definition.rb @@ -402,12 +402,10 @@ module Bundler "updated #{Bundler.default_lockfile.relative_path_from(SharedHelpers.pwd)} to version control." unless explicit_flag - suggested_command = if Bundler.settings.locations("frozen")[:global] + suggested_command = if Bundler.settings.locations("frozen").keys.&([:global, :local]).any? "bundle config unset frozen" elsif Bundler.settings.locations("deployment").keys.&([:global, :local]).any? "bundle config unset deployment" - else - "bundle install --no-deployment" end msg << "\n\nIf this is a development machine, remove the #{Bundler.default_gemfile} " \ "freeze \nby running `#{suggested_command}`." |