diff options
| author | Mike McQuaid | 2013-09-18 12:36:43 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2013-09-18 12:36:43 +0100 |
| commit | a7e1dbae63ee62e7900dc7fbb3f67ea5c435a0a4 (patch) | |
| tree | e15161dff15246d3a5368b3cddf0ea01bc2033bb /Library/Homebrew/bottles.rb | |
| parent | 1390d5cc12bc93286c1cbd64ea6a34a4e7bfde02 (diff) | |
| download | brew-a7e1dbae63ee62e7900dc7fbb3f67ea5c435a0a4.tar.bz2 | |
Bottles: use options hash for install_bottle?
Diffstat (limited to 'Library/Homebrew/bottles.rb')
| -rw-r--r-- | Library/Homebrew/bottles.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/bottles.rb b/Library/Homebrew/bottles.rb index e067df471..47aa75ffc 100644 --- a/Library/Homebrew/bottles.rb +++ b/Library/Homebrew/bottles.rb @@ -3,8 +3,6 @@ require 'macos' require 'extend/ARGV' require 'bottle_version' -# TODO: use options={} for some arguments. - def bottle_filename f, bottle_revision=nil name = f.name.downcase version = f.stable.version @@ -12,7 +10,7 @@ def bottle_filename f, bottle_revision=nil "#{name}-#{version}#{bottle_native_suffix(bottle_revision)}" end -def install_bottle? f, warn=false +def install_bottle? f, options={:warn=>false} return true if f.downloader and defined? f.downloader.local_bottle_path \ and f.downloader.local_bottle_path @@ -22,7 +20,9 @@ def install_bottle? f, warn=false return false unless f.build.used_options.empty? return false unless bottle_current?(f) if f.bottle.cellar != :any && f.bottle.cellar != HOMEBREW_CELLAR.to_s - opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}" if warn + if options[:warn] + opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}" + end return false end |
