mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Try to fix download error
https://github.com/ruby/ruby/runs/1428320660?check_suite_focus=true#step:9:10 ``` tool/downloader.rb:243:in `rescue in download': failed to download config.guess (RuntimeError) OpenURI::HTTPError: 403 Forbidden: https://cdn.jsdelivr.net/gh/gcc-mirror/gcc@master/config.guess ```
This commit is contained in:
parent
8cbd5f218b
commit
4b899f9164
Notes:
git
2020-11-20 14:18:39 +09:00
1 changed files with 6 additions and 1 deletions
|
@ -51,7 +51,12 @@ class Downloader
|
||||||
class GNU < self
|
class GNU < self
|
||||||
def self.download(name, *rest)
|
def self.download(name, *rest)
|
||||||
if https?
|
if https?
|
||||||
|
begin
|
||||||
super("https://cdn.jsdelivr.net/gh/gcc-mirror/gcc@master/#{name}", name, *rest)
|
super("https://cdn.jsdelivr.net/gh/gcc-mirror/gcc@master/#{name}", name, *rest)
|
||||||
|
rescue => e
|
||||||
|
STDERR.puts "Download failed (#{e.message}), try another URL"
|
||||||
|
super("https://raw.githubusercontent.com/gcc-mirror/gcc/master/#{name}", name, *rest)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
super("https://repo.or.cz/official-gcc.git/blob_plain/HEAD:/#{name}", name, *rest)
|
super("https://repo.or.cz/official-gcc.git/blob_plain/HEAD:/#{name}", name, *rest)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue