diff options
| author | Adam Vandenberg | 2013-06-06 16:54:52 -0700 | 
|---|---|---|
| committer | Adam Vandenberg | 2013-06-06 16:55:12 -0700 | 
| commit | d3af8cc80c081d8b6eb7fe25d9ac4c1ac1259744 (patch) | |
| tree | 10a8f0f3b79054a39d0583bc3616f4585f9acbde | |
| parent | 289144a8daee7afdddf71c7b6e6f2afc30369f77 (diff) | |
| download | homebrew-d3af8cc80c081d8b6eb7fe25d9ac4c1ac1259744.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.
| -rw-r--r-- | Library/Homebrew/formula_specialties.rb | 8 | 
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  | 
