aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/fetch.rb
diff options
context:
space:
mode:
authorJack Nagel2013-05-16 14:06:26 -0500
committerJack Nagel2013-05-16 14:06:26 -0500
commit2d8496129c9ae4fcc8a85fd487342fe37ebac107 (patch)
treef5915048e8945cdf8cc70bd4ba57bd72a0dcdddd /Library/Homebrew/cmd/fetch.rb
parentdaef74aa27b8316865a44484fefd2d7c424c7342 (diff)
downloadbrew-2d8496129c9ae4fcc8a85fd487342fe37ebac107.tar.bz2
Formula#fetch: always return the cached path
This allows us to remove some type checks that were protecting against potential nils.
Diffstat (limited to 'Library/Homebrew/cmd/fetch.rb')
-rw-r--r--Library/Homebrew/cmd/fetch.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index 24b1b0614..f075bcdce 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -27,8 +27,7 @@ module Homebrew extend self
f.cached_download.rmtree if already_fetched?(f) && ARGV.force?
download = f.fetch
- # FIXME why are strategies returning different types?
- return unless download.is_a? Pathname
+ return unless download.file?
puts "Downloaded to: #{download}" unless already_fetched?(f)
puts Checksum::TYPES.map { |t| "#{t.to_s.upcase}: #{download.send(t)}" }