Warn when overriding ScriptFileFormula#install

ScriptFileFormula's use is that it installs whatever was downloaded
to bin; if the install is overridden, there's no benefit over deriving
directly from Formula.
This commit is contained in:
Adam Vandenberg 2013-06-06 16:54:52 -07:00
parent 6c6bbc702c
commit e7838bdebb

View File

@ -5,6 +5,14 @@ class ScriptFileFormula < Formula
def install def install
bin.install Dir['*'] bin.install Dir['*']
end end
def self.method_added method
super method
case method
when :install
opoo "#{name}: if you are overriding ScriptFileFormula#install, use a Formula instead"
end
end
end end
# See browser for an example # See browser for an example