diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-22 03:18:17 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-05-22 03:18:17 +0000 |
commit | 7a14ffbf5d38a1697936d08ef7782c355049b028 (patch) | |
tree | f9208dbd26e97645d838e3153b694e92e2decaec /tool/downloader.rb | |
parent | 8623ba8618ad3fce642b5d206626a3b39bf11139 (diff) |
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/downloader.rb')
-rw-r--r-- | tool/downloader.rb | 6 |
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}" |