aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 12:42:08 -0500
committerJack Nagel2014-07-06 13:12:01 -0500
commit2d83c085926a922c847468adf7f66eb442dcd30f (patch)
tree3b13de11e042fbd1ea97bbd18e88ef874d51ecf1 /Library/Homebrew/cmd
parentf8fb74ff76f4f6b779bcaccee94bdb442f2ea51a (diff)
downloadbrew-2d83c085926a922c847468adf7f66eb442dcd30f.tar.bz2
Make tap_ref match similar code in update
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/tap.rb8
-rw-r--r--Library/Homebrew/cmd/update.rb2
2 files changed, 4 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb
index 3fb5ca65c..8ed45b239 100644
--- a/Library/Homebrew/cmd/tap.rb
+++ b/Library/Homebrew/cmd/tap.rb
@@ -121,12 +121,10 @@ module Homebrew
def tap_ref(path)
case path.to_s
+ when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula}o
+ "Homebrew/homebrew/#{path.basename(".rb")}"
when HOMEBREW_TAP_PATH_REGEX
- "#$1/#$2/#{File.basename($3, '.rb')}"
- when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula/(.+)}o
- "Homebrew/homebrew/#{File.basename($1, '.rb')}"
- else
- nil
+ "#{$1}/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"
end
end
end
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb
index b1ee8d8fe..b85a355b8 100644
--- a/Library/Homebrew/cmd/update.rb
+++ b/Library/Homebrew/cmd/update.rb
@@ -269,7 +269,7 @@ class Report
when %r{^#{Regexp.escape(HOMEBREW_LIBRARY.to_s)}/Formula}o
path.basename(".rb").to_s
when HOMEBREW_TAP_PATH_REGEX
- "#$1/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"
+ "#{$1}/#{$2.sub("homebrew-", "")}/#{path.basename(".rb")}"
end
end.compact.sort
end