aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.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/formula.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/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 53aec6dcf..21df196df 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -619,6 +619,7 @@ class Formula
# Ensure the cache exists
HOMEBREW_CACHE.mkpath
downloader.fetch
+ cached_download
end
# For FormulaInstaller.
@@ -644,7 +645,7 @@ class Formula
def stage
fetched = fetch
- verify_download_integrity(fetched) if fetched.kind_of? Pathname
+ verify_download_integrity(fetched) if fetched.file?
mktemp do
downloader.stage
# Set path after the downloader changes the working folder.