From 7f4c7e0afcf1427ec87084573ac6945c449ce363 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sun, 26 Jan 2020 22:01:02 -0800 Subject: [PATCH] bottle: Elide root_url only if it is the default Elide root_url only if it is precisely equal to the default root_url. Eliding root_url when a prefix matches the default also elides a custom root_url such as https://linuxbrew.bintray.com/bottles-bio. --- Library/Homebrew/dev-cmd/bottle.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 76d81bfeef..4c99c022a7 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -11,7 +11,7 @@ require "erb" BOTTLE_ERB = <<-EOS bottle do - <% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %> + <% if root_url != "#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles" %> root_url "<%= root_url %>" <% end %> <% if ![HOMEBREW_DEFAULT_PREFIX, LINUXBREW_DEFAULT_PREFIX].include?(prefix) %>