aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-12-03 10:12:45 -0600
committerJack Nagel2013-12-03 10:14:11 -0600
commit6d7a3d7fa435edf1e0731e5f7a0121ec156ece48 (patch)
tree95d9b8d868f86d6447117631229677723efdd822 /Library
parent099954499ffbea9e74ea1482cb03fa4da943373a (diff)
downloadbrew-6d7a3d7fa435edf1e0731e5f7a0121ec156ece48.tar.bz2
download_strategy: use clear_cache where appropriate
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/download_strategy.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index b09c296cf..6957ae171 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -371,7 +371,7 @@ class SubversionDownloadStrategy < VCSDownloadStrategy
if @clone.exist? and not repo_valid?
puts "Removing invalid SVN repo from cache"
- @clone.rmtree
+ clear_cache
end
case @ref_type
@@ -474,7 +474,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
end
elsif @clone.exist?
puts "Removing invalid .git repo from cache"
- FileUtils.rm_rf @clone
+ clear_cache
clone_repo
else
clone_repo
@@ -675,7 +675,7 @@ class MercurialDownloadStrategy < VCSDownloadStrategy
@clone.cd { quiet_safe_system hgpath, 'pull', '--update' }
elsif @clone.exist?
puts "Removing invalid hg repo from cache"
- @clone.rmtree
+ clear_cache
clone_repo
else
clone_repo
@@ -726,7 +726,7 @@ class BazaarDownloadStrategy < VCSDownloadStrategy
@clone.cd { safe_system bzrpath, 'update' }
elsif @clone.exist?
puts "Removing invalid bzr repo from cache"
- @clone.rmtree
+ clear_cache
clone_repo
else
clone_repo