From 7504d830cb7ba8617ab4adc4468239c8c71fa5a7 Mon Sep 17 00:00:00 2001 From: Justin Baugh Date: Thu, 20 Jul 2017 11:08:53 -0400 Subject: [PATCH] Add warning to doctor if HOMEBREW_BUILD_FROM_SOURCE is set. --- Library/Homebrew/diagnostic.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index a5adfeb63a..f5e07ac2fc 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -98,6 +98,17 @@ module Homebrew EOS end + def check_build_from_source + return if !ENV.has_key?("HOMEBREW_BUILD_FROM_SOURCE") + + <<-EOS.undent + You have HOMEBREW_BUILD_FROM_SOURCE set. This environment variable is + intended for use by Homebrew developers. If you are encountering errors, + please try unsetting this. Please do not file issues if you encounter + errors when using this environment variable. + EOS + end + # See https://github.com/Homebrew/legacy-homebrew/pull/9986 def check_path_for_trailing_slashes bad_paths = PATH.new(ENV["HOMEBREW_PATH"]).select { |p| p.end_with?("/") }