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
commitdaef74aa27b8316865a44484fefd2d7c424c7342 (patch)
treefe85285b4c4e6c66a62fc8f004dd241e3f11c2ff /Library/Homebrew/formula.rb
parenta6f9a1c4a3cc8a2cad998caf30522f86c2f4a3de (diff)
downloadbrew-daef74aa27b8316865a44484fefd2d7c424c7342.tar.bz2
Adjust semantics of Formula#fetch
It doesn't really make logical sense that this method returns both the fetched path (or sometimes nil!) and the downloader, so just return the path (again, or nil!) and callers that want the downloader can ask for it separately.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index dafb18ed0..53aec6dcf 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -618,7 +618,7 @@ class Formula
def fetch
# Ensure the cache exists
HOMEBREW_CACHE.mkpath
- return downloader.fetch, downloader
+ downloader.fetch
end
# For FormulaInstaller.
@@ -643,8 +643,8 @@ class Formula
private
def stage
- fetched, downloader = fetch
- verify_download_integrity fetched if fetched.kind_of? Pathname
+ fetched = fetch
+ verify_download_integrity(fetched) if fetched.kind_of? Pathname
mktemp do
downloader.stage
# Set path after the downloader changes the working folder.