Skip to content

Commit

Permalink
avoid using curl when downloading ocm
Browse files Browse the repository at this point in the history
  • Loading branch information
akostadinov committed Jan 23, 2021
1 parent 6e0777e commit a16a38f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions lib/launchers/o_c_m_cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,11 @@ def download_ocm_cli
raise "Unsupported OS"
end
end
#doesn't work
#File.open('/tmp/ocm', 'wb') do |file|
# @result = Http.get(url: url) do |chunk|
# file.write chunk
# end
#end
shell("curl -L #{url} -o /tmp/ocm")
File.open('/tmp/ocm', 'wb') do |file|
@result = Http.get(url: url, raise_on_error: true) do |chunk|
file.write chunk
end
end
File.chmod(0775, '/tmp/ocm')
return '/tmp/ocm'
end
Expand Down

0 comments on commit a16a38f

Please sign in to comment.