From 0f0aa83fa1f9cea4b55dfeded7305df6c0ce65c8 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 9 Dec 2020 12:51:00 +0000 Subject: [PATCH] software_spec: deprecate `prefix` for bottles. Turns out we weren't actually using/checking this value at all (so I'd be very surprised if anyone is actually using it). --- Library/Homebrew/software_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index d34314e8bc..15ff547658 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -356,6 +356,15 @@ class BottleSpecification @root_url_specs = {} 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 = {}) if var.nil? @root_url ||= "#{Homebrew::EnvConfig.bottle_domain}/#{Utils::Bottles::Bintray.repository(tap)}"