aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index e0c9921cd..92b7d40a0 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -437,6 +437,10 @@ class Formula
Formulary.factory name
end
+ def tap?
+ !!path.realpath.to_s.match(HOMEBREW_TAP_DIR_REGEX)
+ end
+
def tap
if path.realpath.to_s =~ HOMEBREW_TAP_DIR_REGEX
"#$1/#$2"