History

Merge pull request #1323 from simon04/download-failed

prepare_deploy: report which download has failed

Simon Legner committed 5 years ago

Commit 634d3c72 parents 3bb9463 959f51e1 file · +10 −4Browse files

Unified · Split

lib/tasks/docs.thor+10−4
@@ -244,11 +244,17 @@ class DocsCLI < Thor · 243 unmodified lines
244 FileUtils.mkpath(dir)244 FileUtils.mkpath(dir)
245 245
246 ['index.json', 'meta.json'].each do |filename|246 ['index.json', 'meta.json'].each do |filename|
247 open("https://docs.devdocs.io/#{doc.path}/#{filename}?#{time}") do |file|247 json = "https://docs.devdocs.io/#{doc.path}/#{filename}?#{time}"
248 mutex.synchronize do248 begin
249 path = File.join(dir, filename)249 open(json) do |file|
250 File.write(path, file.read)250 mutex.synchronize do
251 path = File.join(dir, filename)
252 File.write(path, file.read)
253 end
251 end254 end
255 rescue => e
256 puts "Docs -- Failed to download #{json}!"
257 throw e
252 end258 end
253 end259 end
254 260