aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Library/Homebrew/cmd/fetch.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index 6099ddf5c..de3efe124 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -20,8 +20,8 @@ module Homebrew extend self
bucket.each do |f|
if ARGV.include? "--force" or ARGV.include? "-f"
- where_to = `brew --cache #{f.name}`.strip
- FileUtils.rm_rf where_to unless where_to.empty?
+ where_to = f.cached_download
+ FileUtils.rm_rf where_to if File.exist? where_to
end
the_tarball = f.downloader.fetch