diff options
| author | Jack Nagel | 2014-03-10 14:56:02 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-10 14:56:02 -0500 |
| commit | 32ab18c189fadace3413985f1ea5cae850afe139 (patch) | |
| tree | 60cd556b119226f5e57ae9d34c3ee0aad9aef5d6 /Library/Homebrew | |
| parent | 4b80d30babce7c60abac7f92ef965c8f2ba8c516 (diff) | |
| download | brew-32ab18c189fadace3413985f1ea5cae850afe139.tar.bz2 | |
Wrap cellar compatibility check in a method
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/software_spec.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index 80778b2b5..0c247e5d8 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -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 diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 9574dd2d3..4706e5ab4 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -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 |
