diff options
| author | Jack Nagel | 2015-06-15 21:32:15 -0400 |
|---|---|---|
| committer | Jack Nagel | 2015-06-15 21:32:15 -0400 |
| commit | f13ac9b0c8c03ccb72aeed29d2969014d7f660e8 (patch) | |
| tree | e646e7985e764419f5b3173e2f318c1d1da9b071 | |
| parent | 321476df08b1e6e503d4628af8b1f76d1d87ec9d (diff) | |
| download | brew-f13ac9b0c8c03ccb72aeed29d2969014d7f660e8.tar.bz2 | |
Decouple the local bottle strategy from the formula
| -rw-r--r-- | Library/Homebrew/download_strategy.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index b51c4cc29..93cd4250c 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -417,8 +417,8 @@ end class LocalBottleDownloadStrategy < AbstractFileDownloadStrategy attr_reader :cached_location - def initialize(formula) - @cached_location = formula.local_bottle_path + def initialize(path) + @cached_location = path end def stage diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 52bf3a0a3..feffb177f 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -610,8 +610,8 @@ class FormulaInstaller return if Homebrew::Hooks::Bottles.pour_formula_bottle(formula) end - if formula.local_bottle_path - downloader = LocalBottleDownloadStrategy.new(formula) + if (bottle_path = formula.local_bottle_path) + downloader = LocalBottleDownloadStrategy.new(bottle_path) else downloader = formula.bottle downloader.verify_download_integrity(downloader.fetch) |
