From 97267227bbd8c322cf17c1e0ae380f74afbc29fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Mon, 25 May 2020 12:18:44 +0200 Subject: [PATCH] [rubygems/rubygems] Don't recommend the `--no-deployment` flag https://github.com/rubygems/rubygems/commit/b368c7e0c4 --- lib/bundler/cli/outdated.rb | 4 +--- 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}`."