Skip to content

Commit

Permalink
[CI] Abort with Exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed May 14, 2024
1 parent 7316aba commit abe525b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions rake_tasks/elasticsearch_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ namespace :elasticsearch do

def download_file!(url, filename)
puts "Downloading #{filename} from #{url}"
File.open(filename, "w") do |downloaded_file|
URI.open(url, "rb") do |artifact_file|
File.open(filename, 'w') do |downloaded_file|
URI.open(url, 'rb') do |artifact_file|
downloaded_file.write(artifact_file.read)
end
end
Expand All @@ -54,8 +54,11 @@ namespace :elasticsearch do
warn "[!] Couldn't download #{filename}"
exit 1
end
rescue OpenURI::HTTPError => e
abort e.message
rescue StandardError => e
abort e
puts e.backtrace.join("\n\t")
abort e.message
end

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

0 comments on commit abe525b

Please sign in to comment.