aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-22 03:18:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-05-22 03:18:17 +0000
commit2af1ac4758dfcae8209d7b1db5c9302cf9c8896a (patch)
treef9208dbd26e97645d838e3153b694e92e2decaec /tool
parentfd9c4575586108fac0b4f1273da8914f948d8ebd (diff)
downloadruby-2af1ac4758dfcae8209d7b1db5c9302cf9c8896a.tar.gz
fix r58833
* tool/downloader.rb (Downloader.download): just link to the cache when downloaded to the cache but not the target file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool')
-rw-r--r--tool/downloader.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/tool/downloader.rb b/tool/downloader.rb
index a4c6041018..a8c47f02c7 100644
--- a/tool/downloader.rb
+++ b/tool/downloader.rb
@@ -195,7 +195,11 @@ class Downloader
$stdout.puts "done"
$stdout.flush
end
- save_cache(cache, file, name)
+ if dest.eql?(cache)
+ link_cache(cache, file, name)
+ else
+ save_cache(cache, file, name)
+ end
return file.to_path
rescue => e
raise "failed to download #{name}\n#{e.message}: #{url}"