diff options
| author | Jack Nagel | 2011-09-01 19:09:21 -0500 |
|---|---|---|
| committer | Jack Nagel | 2011-09-01 19:17:13 -0500 |
| commit | 2505ebda673bf73ef057540d8165f76eee2c3081 (patch) | |
| tree | 3ef8f5321706834dd472ba5a7c4a0b69fc95eaa7 /Library | |
| parent | 66841687ebb06fbf5dbc67b1970705104cb863b8 (diff) | |
| download | brew-2505ebda673bf73ef057540d8165f76eee2c3081.tar.bz2 | |
fetch: fix '--force' for pathnames
`brew fetch --force` was a no-op for formula pathnames when that formula
did not exist in Library/Formula, because `brew --cache #{f.name}`
results in an error for that case.
Fix it by always using f.cached_download.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/fetch.rb | 4 |
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 |
