aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-09-17 16:20:20 +0100
committerMax Howell2009-09-17 18:42:56 +0100
commit2149d9035a3c6c1dba3fd0726616787307105d35 (patch)
treed28f521206f7d0cf33e74f38ba14b74fed1c0be4
parenta7315fce205ae04c53edaf9e0db36a5a124a6d43 (diff)
downloadbrew-2149d9035a3c6c1dba3fd0726616787307105d35.tar.bz2
Delete the partial download with any exception
Don't delete it if it doesn't exist.
-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