From 0b9a870e1c2d6a9e914c7e21e5f827f3e8fe39f1 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sat, 2 Nov 2019 00:33:08 +0100 Subject: [PATCH] Ensure `@downloaded_path` is not nil. --- Library/Homebrew/cask/installer.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/installer.rb b/Library/Homebrew/cask/installer.rb index 3a15a3497f..d1f54e807b 100644 --- a/Library/Homebrew/cask/installer.rb +++ b/Library/Homebrew/cask/installer.rb @@ -148,6 +148,8 @@ module Cask end def download + return @downloaded_path if @downloaded_path + odebug "Downloading" @downloaded_path = Download.new(@cask, force: false, quarantine: quarantine?).perform odebug "Downloaded to -> #{@downloaded_path}" @@ -167,6 +169,7 @@ module Cask def primary_container @primary_container ||= begin + download UnpackStrategy.detect(@downloaded_path, type: @cask.container&.type, merge_xattrs: true) end end @@ -317,7 +320,7 @@ module Cask end begin - graph.tsort - [@cask] + @cask_and_formula_dependencies = graph.tsort - [@cask] rescue TSort::Cyclic strongly_connected_components = graph.strongly_connected_components.sort_by(&:count) cyclic_dependencies = strongly_connected_components.last - [@cask]