mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Reorder downloader.cached_location
assignment.
This commit is contained in:
parent
5e3bc85527
commit
f8b8186fa7
@ -112,10 +112,10 @@ module Formulary
|
|||||||
resource = Resource.new(formula_name) { url bottle_name }
|
resource = Resource.new(formula_name) { url bottle_name }
|
||||||
resource.specs[:bottle] = true
|
resource.specs[:bottle] = true
|
||||||
downloader = CurlDownloadStrategy.new resource.name, resource
|
downloader = CurlDownloadStrategy.new resource.name, resource
|
||||||
@bottle_filename = downloader.cached_location
|
cached = downloader.cached_location.exist?
|
||||||
cached = @bottle_filename.exist?
|
|
||||||
downloader.fetch
|
downloader.fetch
|
||||||
ohai "Pouring the cached bottle" if cached
|
ohai "Pouring the cached bottle" if cached
|
||||||
|
@bottle_filename = downloader.cached_location
|
||||||
else
|
else
|
||||||
@bottle_filename = Pathname(bottle_name).realpath
|
@bottle_filename = Pathname(bottle_name).realpath
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user