From 0e3ab6e6f29e0d3043db5e72eebfd56c13798d2e Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 11 Oct 2019 09:02:41 +0100 Subject: [PATCH] exceptions: tweak build flags error message. --- Library/Homebrew/exceptions.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 603ee65e63..00cdf04d7a 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -466,15 +466,17 @@ class BuildFlagsError < RuntimeError require_text = "requires" end - message = +<<~EOS + bottle_text = if bottled + <<~EOS + Alternatively, remove the #{flag_text} to attempt bottle installation. + EOS + end + + message = <<~EOS The following #{flag_text}: #{flags.join(", ")} #{require_text} building tools, but none are installed. - #{DevelopmentTools.installation_instructions} - EOS - - message << <<~EOS if bottled - Alternatively, remove the #{flag_text} to attempt bottle installation. + #{DevelopmentTools.installation_instructions}#{bottle_text} EOS super message