[前][次][番号順一覧][スレッド一覧]

ruby-changes:61488

From: David <ko1@a...>
Date: Fri, 5 Jun 2020 07:33:18 +0900 (JST)
Subject: [ruby-changes:61488] 97267227bb (master): [rubygems/rubygems] Don't recommend the `--no-deployment` flag

https://git.ruby-lang.org/ruby.git/commit/?id=97267227bb

From 97267227bbd8c322cf17c1e0ae380f74afbc29fb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Mon, 25 May 2020 12:18:44 +0200
Subject: [rubygems/rubygems] Don't recommend the `--no-deployment` flag

https://github.com/rubygems/rubygems/commit/b368c7e0c4

diff --git a/lib/bundler/cli/outdated.rb b/lib/bundler/cli/outdated.rb
index 5f06565..892c29c 100644
--- a/lib/bundler/cli/outdated.rb
+++ b/lib/bundler/cli/outdated.rb
@@ -220,12 +220,10 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/cli/outdated.rb#L220
 
     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 40f11ff..df87358 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -402,12 +402,10 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/definition.rb#L402
              "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}`."
-- 
cgit v0.10.2


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]