diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-05-25 12:18:44 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-05 07:32:42 +0900 |
commit | 97267227bbd8c322cf17c1e0ae380f74afbc29fb (patch) | |
tree | dcbd7cb0fb047e9a7e37394a11f91886f5f47f5d /lib | |
parent | 1914c4e9b1b68ac0650f4c3cdf91d9499bbfcf49 (diff) |
[rubygems/rubygems] Don't recommend the `--no-deployment` flag
https://github.com/rubygems/rubygems/commit/b368c7e0c4
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3184
Diffstat (limited to 'lib')
-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}`." |