aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 3ad91ac8b..283395124 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -495,6 +495,11 @@ class Formula
end
end
+ # True if this formula is provided by Homebrew itself
+ def core_formula?
+ path.realpath.to_s == Formula.path(name).to_s
+ end
+
def self.path name
Pathname.new("#{HOMEBREW_REPOSITORY}/Library/Formula/#{name.downcase}.rb")
end