aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorSimon Sigurdhsson2012-08-04 18:50:17 +0200
committerMike McQuaid2013-02-02 14:05:40 -0800
commit34cfc378b5d9ef4d762365bc7a851af1f985d7c8 (patch)
treef50a538bfc547211128f3a5a14b03b668aa2ef33 /Library/Homebrew/cmd
parent99eadf1cdbf839979a4c6b9763ecba3643476dd0 (diff)
downloadhomebrew-34cfc378b5d9ef4d762365bc7a851af1f985d7c8.tar.bz2
Make `CurlDownloadStrategy` resume aborted downloads
* `CurlDownloadStrategy#_fetch` (and the same methods in its subclasses) now fetches the file to a temporary path, and `CurlDownloadStrategy#fetch` moves it to the correct location. * `Homebrew#cleanup` cleans the temporary files `CurlDownloadStrategy` creates if they're left in the cache. Closes #13953. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/cleanup.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb
index 6b4e6b400..490065606 100644
--- a/Library/Homebrew/cmd/cleanup.rb
+++ b/Library/Homebrew/cmd/cleanup.rb
@@ -77,6 +77,10 @@ module Homebrew extend self
end
end
end
+ if pn.basename.to_s.split('.').last == 'incomplete'
+ puts "Removing #{pn}..."
+ rm pn unless ARGV.dry_run?
+ end
end
end