aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2009-09-17 16:20:20 +0100
committerMax Howell2009-09-17 18:42:56 +0100
commitf08a66a8b73221a4a2ea94821b02a22c196b6083 (patch)
tree54dba7eed8a010460bc785e7889221fa4f6f901d /Library
parentd61800688b72cf354de415601e199c1945101c0d (diff)
downloadhomebrew-f08a66a8b73221a4a2ea94821b02a22c196b6083.tar.bz2
Delete the partial download with any exception
Don't delete it if it doesn't exist.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 2cd85f3bb..0c89c1f2b 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -39,8 +39,8 @@ class HttpDownloadStrategy <AbstractDownloadStrategy
unless @dl.exist?
begin
curl @url, '-o', @dl
- rescue
- @dl.unlink
+ rescue Exception
+ @dl.unlink if @dl.exist?
raise
end
else