diff options
| author | Baptiste Fontaine | 2015-07-24 00:49:34 +0200 | 
|---|---|---|
| committer | Baptiste Fontaine | 2015-07-28 20:40:28 +0200 | 
| commit | ea08e4fb16b7f9ffc66b267d532bcdea4f513f0b (patch) | |
| tree | 68561e0d7eacc8281127460f6db7864fa635a545 /Library/Homebrew/formula_support.rb | |
| parent | ea13d62ce0f23f22abd14e04cf87ce6babb07ef5 (diff) | |
| download | brew-ea08e4fb16b7f9ffc66b267d532bcdea4f513f0b.tar.bz2 | |
KegOnlyReason: print only the explanation if there’s one
Closes Homebrew/homebrew#42073.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library/Homebrew/formula_support.rb')
| -rw-r--r-- | Library/Homebrew/formula_support.rb | 11 | 
1 files changed, 3 insertions, 8 deletions
diff --git a/Library/Homebrew/formula_support.rb b/Library/Homebrew/formula_support.rb index 6813c1faa..f6bb000bc 100644 --- a/Library/Homebrew/formula_support.rb +++ b/Library/Homebrew/formula_support.rb @@ -23,28 +23,23 @@ class KegOnlyReason    end    def to_s +    return @explanation unless @explanation.empty?      case @reason      when :provided_by_osx then <<-EOS  OS X already provides this software and installing another version in  parallel can cause all kinds of trouble. - -#{@explanation}  EOS      when :shadowed_by_osx then <<-EOS  OS X provides similar software, and installing this software in  parallel can cause all kinds of trouble. - -#{@explanation}  EOS      when :provided_pre_mountain_lion then <<-EOS  OS X already provides this software in versions before Mountain Lion. - -#{@explanation}  EOS      when :provided_until_xcode43 -      "Xcode provides this software prior to version 4.3.\n\n#{@explanation}" +      "Xcode provides this software prior to version 4.3."      when :provided_until_xcode5 -      "Xcode provides this software prior to version 5.\n\n#{@explanation}" +      "Xcode provides this software prior to version 5."      else        @reason      end.strip  | 
