From e7838bdebb1fe492ffbd934fe0ac1af527d2fa86 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 6 Jun 2013 16:54:52 -0700 Subject: [PATCH] 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. --- Library/Homebrew/formula_specialties.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/formula_specialties.rb b/Library/Homebrew/formula_specialties.rb index 2529243b20..e91c02dc01 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