software_spec.rb: add tag_to_cellar method
This commit is contained in:
parent
d2857e0dd8
commit
17005b93ab
@ -504,14 +504,19 @@ class BottleSpecification
|
||||
end
|
||||
end
|
||||
|
||||
sig { params(tag: Utils::Bottles::Tag).returns(T::Boolean) }
|
||||
def compatible_locations?(tag: Utils::Bottles.tag)
|
||||
sig { params(tag: Utils::Bottles::Tag).returns(T.any(Symbol, String)) }
|
||||
def tag_to_cellar(tag = Utils::Bottles.tag)
|
||||
spec = collector.specification_for(tag)
|
||||
cellar = if spec.present?
|
||||
if spec.present?
|
||||
spec.cellar
|
||||
else
|
||||
tag.default_cellar
|
||||
end
|
||||
end
|
||||
|
||||
sig { params(tag: Utils::Bottles::Tag).returns(T::Boolean) }
|
||||
def compatible_locations?(tag: Utils::Bottles.tag)
|
||||
cellar = tag_to_cellar(tag)
|
||||
|
||||
return true if [:any, :any_skip_relocation].include?(cellar)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user