Skip to content

Commit dbb602c

Browse files
committed
[CI] Abort with Exception message
1 parent 863862b commit dbb602c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

rake_tasks/elasticsearch_tasks.rake

+6-3
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ namespace :elasticsearch do
4343

4444
def download_file!(url, filename)
4545
puts "Downloading #{filename} from #{url}"
46-
File.open(filename, "w") do |downloaded_file|
47-
URI.open(url, "rb") do |artifact_file|
46+
File.open(filename, 'w') do |downloaded_file|
47+
URI.open(url, 'rb') do |artifact_file|
4848
downloaded_file.write(artifact_file.read)
4949
end
5050
end
@@ -54,8 +54,11 @@ namespace :elasticsearch do
5454
warn "[!] Couldn't download #{filename}"
5555
exit 1
5656
end
57+
rescue OpenURI::HTTPError => e
58+
abort e.message
5759
rescue StandardError => e
58-
abort e
60+
puts e.backtrace.join("\n\t")
61+
abort e.message
5962
end
6063

6164
desc 'Download artifacts (tests and REST spec) for currently running cluster'

0 commit comments

Comments
 (0)