aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-05-21 04:36:53 +0100
committerMax Howell2009-05-21 04:36:53 +0100
commit85bcf8b9e5244f4d4875c1028349be064dc620f9 (patch)
treec9d2b071b065cec585132d3411292a832c58de30
parentacc2f7969640c59dd27832f796c2a7373ed4d0b3 (diff)
downloadbrew-85bcf8b9e5244f4d4875c1028349be064dc620f9.tar.bz2
Raise an error on download failure
-rw-r--r--Cellar/homebrew/brewkit.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb
index 900754125..04c9a86d6 100644
--- a/Cellar/homebrew/brewkit.rb
+++ b/Cellar/homebrew/brewkit.rb
@@ -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