From 85bcf8b9e5244f4d4875c1028349be064dc620f9 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 21 May 2009 04:36:53 +0100 Subject: [PATCH] Raise an error on download failure --- Cellar/homebrew/brewkit.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Cellar/homebrew/brewkit.rb b/Cellar/homebrew/brewkit.rb index 900754125a..04c9a86d6e 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