prepare_deploy: report which download has failed

pull/1323/head
Simon Legner 4 years ago
parent f4d0c79e4d
commit 959f51e6f7

@ -244,12 +244,18 @@ class DocsCLI < Thor
FileUtils.mkpath(dir)
['index.json', 'meta.json'].each do |filename|
open("https://docs.devdocs.io/#{doc.path}/#{filename}?#{time}") do |file|
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
puts "Docs -- Downloaded #{doc.slug}"

Loading…
Cancel
Save