aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-07-29 16:27:54 +0200
committerMarkus Reiter2017-07-30 14:22:05 +0200
commit6d6ce7cf0a530b47a557ea748de9702420f6fab4 (patch)
tree16acaefac8808de62b20d50e5c77282c18e3c674 /Library/Homebrew/formula.rb
parent627b1dae707b4b5ea5e299ff12dd8ac1abbfa056 (diff)
downloadbrew-6d6ce7cf0a530b47a557ea748de9702420f6fab4.tar.bz2
Detect `Tap` in `CaskLoader`.
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 9a31c9e5e..e8e3fa9eb 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -177,8 +177,8 @@ class Formula
@tap = if path == Formulary.core_path(name)
CoreTap.instance
- elsif path.to_s =~ HOMEBREW_TAP_PATH_REGEX
- Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))
+ elsif match = path.to_s.match(HOMEBREW_TAP_PATH_REGEX)
+ Tap.fetch(match[:user], match[:repo])
end
@full_name = full_name_with_optional_tap(name)