mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
prepare_deploy: report which download has failed
This commit is contained in:
parent
f4d0c79e4d
commit
959f51e6f7
1 changed files with 10 additions and 4 deletions
|
@ -244,11 +244,17 @@ class DocsCLI < Thor
|
|||
FileUtils.mkpath(dir)
|
||||
|
||||
['index.json', 'meta.json'].each do |filename|
|
||||
open("https://docs.devdocs.io/#{doc.path}/#{filename}?#{time}") do |file|
|
||||
mutex.synchronize do
|
||||
path = File.join(dir, filename)
|
||||
File.write(path, file.read)
|
||||
json = "https://docs.devdocs.io/#{doc.path}/#{filename}?#{time}"
|
||||
begin
|
||||
open(json) do |file|
|
||||
mutex.synchronize do
|
||||
path = File.join(dir, filename)
|
||||
File.write(path, file.read)
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
puts "Docs -- Failed to download #{json}!"
|
||||
throw e
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue