Reorder downloader.cached_location assignment.

This commit is contained in:
Markus Reiter 2018-07-05 11:53:29 +02:00
parent 5e3bc85527
commit f8b8186fa7

View File

@ -112,10 +112,10 @@ module Formulary
resource = Resource.new(formula_name) { url bottle_name }
resource.specs[:bottle] = true
downloader = CurlDownloadStrategy.new resource.name, resource
@bottle_filename = downloader.cached_location
cached = @bottle_filename.exist?
cached = downloader.cached_location.exist?
downloader.fetch
ohai "Pouring the cached bottle" if cached
@bottle_filename = downloader.cached_location
else
@bottle_filename = Pathname(bottle_name).realpath
end