Merge pull request #6144 from xu-cheng/bottle

Fix bug in bottles
This commit is contained in:
Mike McQuaid 2019-05-20 20:00:08 +01:00 committed by GitHub
commit 7f4aefe41a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -235,6 +235,7 @@ export HOMEBREW_MACOS_VERSION
export HOMEBREW_MACOS_VERSION_NUMERIC
export HOMEBREW_USER_AGENT
export HOMEBREW_USER_AGENT_CURL
export HOMEBREW_BOTTLE_DEFAULT_DOMAIN
if [[ -n "$HOMEBREW_MACOS" && -x "/usr/bin/xcode-select" ]]
then

View File

@ -13,7 +13,7 @@ require "erb"
BOTTLE_ERB = <<-EOS.freeze
bottle do
<% if !["#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles", "https://homebrew.bintray.com/bottles"].include?(root_url) %>
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
root_url "<%= root_url %>"
<% end %>
<% if ![Homebrew::DEFAULT_PREFIX, "/usr/local"].include?(prefix) %>