Skip to content
Snippets Groups Projects
Commit 85bcf8b9 authored by Max Howell's avatar Max Howell
Browse files

Raise an error on download failure

parent acc2f796
No related branches found
No related tags found
No related merge requests found
......@@ -101,7 +101,10 @@ class Formula
protected
def fetch
tgz=File.expand_path File.basename(@url)
`curl -LOA "#{$agent}" "#{@url}"` unless File.exists? tgz
unless File.exists? tgz
`curl -LOA "#{$agent}" "#{@url}"`
raise "Download failed" unless $? == 0
end
return tgz
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment