Merge pull request #4890 from sjackman/elide-root-url

Elide default root_url in the bottle block
This commit is contained in:
Mike McQuaid 2018-09-13 14:29:45 +01:00 committed by GitHub
commit f3ea2a85da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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