aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-10-09 19:43:31 +0800
committerXu Cheng2015-10-10 01:33:58 +0800
commit5b321ffb5a5308f1de96e7bfa79e83828e9c9552 (patch)
tree7cade61bf0ea05b077c1cbad6fc77a15c7e146b3 /Library
parent51a585e0b4c642b1a265f68fbd8c6d4a5f38db17 (diff)
downloadbrew-5b321ffb5a5308f1de96e7bfa79e83828e9c9552.tar.bz2
caveats: show information based on build options
Fixes Homebrew/homebrew#44729. Fixes Homebrew/homebrew#40863. Closes Homebrew/homebrew#44779. Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/caveats.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb
index c8e466cab..e4e880fa2 100644
--- a/Library/Homebrew/caveats.rb
+++ b/Library/Homebrew/caveats.rb
@@ -7,8 +7,13 @@ class Caveats
def caveats
caveats = []
- s = f.caveats.to_s
- caveats << s.chomp + "\n" if s.length > 0
+ begin
+ build, f.build = f.build, Tab.for_formula(f)
+ s = f.caveats.to_s
+ caveats << s.chomp + "\n" if s.length > 0
+ ensure
+ f.build = build
+ end
caveats << keg_only_text
caveats << bash_completion_caveats
caveats << zsh_completion_caveats