aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-07-06 12:42:08 -0500
committerJack Nagel2014-07-06 13:12:01 -0500
commit07f56f0adc8c6c7234ccaef2bd90ab27780fb6c2 (patch)
tree72e50d44c9f79aab88e7c8aeede0264a64715472
parente56600e5cf443c325837fc170185d0e47f754352 (diff)
downloadhomebrew-07f56f0adc8c6c7234ccaef2bd90ab27780fb6c2.tar.bz2
Make tap_ref match similar code in update
-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