aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.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/exceptions.rb
parent627b1dae707b4b5ea5e299ff12dd8ac1abbfa056 (diff)
downloadbrew-6d6ce7cf0a530b47a557ea748de9702420f6fab4.tar.bz2
Detect `Tap` in `CaskLoader`.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 23a123c44..8b4cddc59 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -181,8 +181,8 @@ class TapFormulaAmbiguityError < RuntimeError
@name = name
@paths = paths
@formulae = paths.map do |path|
- path.to_s =~ HOMEBREW_TAP_PATH_REGEX
- "#{Tap.fetch(Regexp.last_match(1), Regexp.last_match(2))}/#{path.basename(".rb")}"
+ match = path.to_s.match(HOMEBREW_TAP_PATH_REGEX)
+ "#{Tap.fetch(match[:user], match[:repo])}/#{path.basename(".rb")}"
end
super <<-EOS.undent