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

ruby-changes:70624

From: David <ko1@a...>
Date: Mon, 27 Dec 2021 21:32:45 +0900 (JST)
Subject: [ruby-changes:70624] dd022c1f76 (master): [rubygems/rubygems] Don't redownload `rubygems-update` package if already there

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

From dd022c1f768d4e633f047ec140474b985736ccc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Tue, 21 Dec 2021 10:04:15 +0100
Subject: [rubygems/rubygems] Don't redownload `rubygems-update` package if
 already there

This makes it easier to test the upgrade process locally and should be
more efficient in certain cases where the user has already upgraded in
the past.

https://github.com/rubygems/rubygems/commit/ed6cc88494
---
 lib/rubygems/commands/update_command.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/rubygems/commands/update_command.rb b/lib/rubygems/commands/update_command.rb
index 513351d303f..a78f29427f5 100644
--- a/lib/rubygems/commands/update_command.rb
+++ b/lib/rubygems/commands/update_command.rb
@@ -286,9 +286,8 @@ command to remove old versions. https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/update_command.rb#L286
 
     check_oldest_rubygems version
 
-    update_gem 'rubygems-update', version
-
     installed_gems = Gem::Specification.find_all_by_name 'rubygems-update', requirement
+    installed_gems = update_gem('rubygems-update', version) if installed_gems.empty?
     version        = installed_gems.first.version
 
     install_rubygems version
-- 
cgit v1.2.1


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

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