diagnostic: silence a Jenkins doctor warning.
Allow our Jenkins CI testing for Homebrew/brew to live outside of `/usr/local` without complaint (as it's not using any binary packages anyway).
This commit is contained in:
parent
78fdb470cb
commit
e330047ff9
@ -407,6 +407,12 @@ module Homebrew
|
|||||||
def check_homebrew_prefix
|
def check_homebrew_prefix
|
||||||
return if HOMEBREW_PREFIX.to_s == "/usr/local"
|
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
|
<<-EOS.undent
|
||||||
Your Homebrew's prefix is not /usr/local.
|
Your Homebrew's prefix is not /usr/local.
|
||||||
You can install Homebrew anywhere you want but some bottles (binary packages)
|
You can install Homebrew anywhere you want but some bottles (binary packages)
|
||||||
|
|||||||
@ -84,6 +84,7 @@ class DiagnosticChecksTest < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_check_homebrew_prefix
|
def test_check_homebrew_prefix
|
||||||
|
ENV.delete("JENKINS_HOME")
|
||||||
# the integration tests are run in a special prefix
|
# the integration tests are run in a special prefix
|
||||||
assert_match "Your Homebrew's prefix is not /usr/local.",
|
assert_match "Your Homebrew's prefix is not /usr/local.",
|
||||||
@checks.check_homebrew_prefix
|
@checks.check_homebrew_prefix
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user