aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-06-06 16:54:52 -0700
committerAdam Vandenberg2013-06-06 16:55:12 -0700
commite7838bdebb1fe492ffbd934fe0ac1af527d2fa86 (patch)
treef36f903283527a1b33a1578211aa618d8c9588fa /Library
parent6c6bbc702c81daade38e8d0e79bb4e0b7565e529 (diff)
downloadbrew-e7838bdebb1fe492ffbd934fe0ac1af527d2fa86.tar.bz2
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.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_specialties.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_specialties.rb b/Library/Homebrew/formula_specialties.rb
index 2529243b2..e91c02dc0 100644
--- a/Library/Homebrew/formula_specialties.rb
+++ b/Library/Homebrew/formula_specialties.rb
@@ -5,6 +5,14 @@ class ScriptFileFormula < Formula
def install
bin.install Dir['*']
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
# See browser for an example