Wrap cellar compatibility check in a method
This commit is contained in:
parent
4b80d30bab
commit
32ab18c189
@ -14,7 +14,7 @@ def install_bottle? f, options={:warn=>false}
|
||||
return false unless f.pour_bottle?
|
||||
return false unless f.bottle
|
||||
|
||||
if f.bottle.cellar != :any && f.bottle.cellar != HOMEBREW_CELLAR.to_s
|
||||
unless f.bottle.compatible_cellar?
|
||||
if options[:warn]
|
||||
opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}"
|
||||
end
|
||||
|
||||
@ -121,6 +121,10 @@ class Bottle
|
||||
@cellar = spec.cellar
|
||||
@revision = spec.revision
|
||||
end
|
||||
|
||||
def compatible_cellar?
|
||||
cellar == :any || cellar == HOMEBREW_CELLAR.to_s
|
||||
end
|
||||
end
|
||||
|
||||
class BottleSpecification
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user