Merge pull request #9482 from MikeMcQuaid/deprecate_bottle_prefix

software_spec: deprecate `prefix` for bottles.
This commit is contained in:
Mike McQuaid 2020-12-18 12:16:05 +00:00 committed by GitHub
commit 4067b4d929
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,6 +359,15 @@ class BottleSpecification
@root_url_specs = {} @root_url_specs = {}
end end
def prefix=(prefix)
if [HOMEBREW_DEFAULT_PREFIX,
HOMEBREW_MACOS_ARM_DEFAULT_PREFIX,
HOMEBREW_LINUX_DEFAULT_PREFIX].exclude?(prefix)
odeprecated "setting `prefix` for bottles"
end
@prefix = prefix
end
def root_url(var = nil, specs = {}) def root_url(var = nil, specs = {})
if var.nil? if var.nil?
@root_url ||= "#{Homebrew::EnvConfig.bottle_domain}/#{Utils::Bottles::Bintray.repository(tap)}" @root_url ||= "#{Homebrew::EnvConfig.bottle_domain}/#{Utils::Bottles::Bintray.repository(tap)}"