Raise an error on download failure
This commit is contained in:
parent
acc2f79696
commit
85bcf8b9e5
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user