ruby-changes:72134
From: David <ko1@a...>
Date: Sat, 11 Jun 2022 18:43:51 +0900 (JST)
Subject: [ruby-changes:72134] 3f69774b76 (master): [rubygems/rubygems] No need to redownload if package already there
https://git.ruby-lang.org/ruby.git/commit/?id=3f69774b76 From 3f69774b76067932015dff40d4fd38e9fdfae9ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...> Date: Sat, 26 Mar 2022 12:25:12 +0100 Subject: [rubygems/rubygems] No need to redownload if package already there https://github.com/rubygems/rubygems/commit/285ccbc07e --- lib/bundler/source/rubygems.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb index 8ca43efa19..01feeb75e9 100644 --- a/lib/bundler/source/rubygems.rb +++ b/lib/bundler/source/rubygems.rb @@ -462,6 +462,7 @@ module Bundler https://github.com/ruby/ruby/blob/trunk/lib/bundler/source/rubygems.rb#L462 cache_path = download_cache_path(spec) || default_cache_path_for(rubygems_dir) gem_path = "#{cache_path}/#{spec.file_name}" + return gem_path if File.exist?(gem_path) if requires_sudo? download_path = Bundler.tmp(spec.full_name) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/