From 91e598cf3f88591f2146218eaa2ecc2a3a261e31 Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 29 Jun 2015 14:09:57 -0400 Subject: Install: add BuildToolsError and BuildFlagsError Add these new errors, and guards in formula installation and cmd/{,un,re}install to match, move can_build? to the MacOS module, flatten conditions, remove redundant can_build? check reinstate removed (doctor) check --- Library/Homebrew/extend/ARGV.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index a8eb9a5d2..706b62568 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -200,6 +200,19 @@ module HomebrewArgvExtension value "env" end + # collect any supplied build flags into an array for reporting + def collect_build_flags + build_flags = [] + + build_flags << '--HEAD' if build_head? + build_flags << '--universal' if build_universal? + build_flags << '--32-bit' if build_32_bit? + build_flags << '--build-bottle' if build_bottle? + build_flags << '--build-from-source' if build_from_source? + + build_flags + end + private def spec(default = :stable) -- cgit v1.2.3