From b80dd75a73776d56164be4d250e6efeae965ca3f Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 30 Sep 2009 17:18:40 +0100 Subject: [PATCH] Allow returning true from keg_only? --- Library/Homebrew/install.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/install.rb b/Library/Homebrew/install.rb index fb50e2271f..82785ea99d 100755 --- a/Library/Homebrew/install.rb +++ b/Library/Homebrew/install.rb @@ -7,11 +7,14 @@ require 'brew.h' show_summary_heading = false def text_for_keg_only_formula f + if f.keg_only?.kind_of? String + rationale = "The formula provides the following rationale:\n\n#{f.keg_only?.chomp}" + else + rationale = "The formula didn't provide any rationale for this." + end <<-EOS #{f.name} is keg-only. This means it is not symlinked into Homebrew's -prefix. The formula provides the following rationale: - -#{f.keg_only?.chomp} +prefix. #{rationale} Generally there are no consequences of this for you, however if you build your own software and it requires this formula, you may want to run this command to