aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/diagnostic.rb6
-rw-r--r--Library/Homebrew/test/diagnostic_test.rb1
2 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index 19148a6ae..e8506ce80 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -407,6 +407,12 @@ module Homebrew
def check_homebrew_prefix
return if HOMEBREW_PREFIX.to_s == "/usr/local"
+ # Allow our Jenkins CI tests to live outside of /usr/local.
+ if ENV["JENKINS_HOME"] &&
+ ENV["GIT_URL"].to_s.start_with?("https://github.com/Homebrew/brew")
+ return
+ end
+
<<-EOS.undent
Your Homebrew's prefix is not /usr/local.
You can install Homebrew anywhere you want but some bottles (binary packages)
diff --git a/Library/Homebrew/test/diagnostic_test.rb b/Library/Homebrew/test/diagnostic_test.rb
index aa2e44cfc..c9bb524b0 100644
--- a/Library/Homebrew/test/diagnostic_test.rb
+++ b/Library/Homebrew/test/diagnostic_test.rb
@@ -84,6 +84,7 @@ class DiagnosticChecksTest < Homebrew::TestCase
end
def test_check_homebrew_prefix
+ ENV.delete("JENKINS_HOME")
# the integration tests are run in a special prefix
assert_match "Your Homebrew's prefix is not /usr/local.",
@checks.check_homebrew_prefix