From ea9977f3c3ee45925debd032fdd373440a2c92d1 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Mon, 11 Feb 2019 15:11:19 -0800 Subject: [PATCH] formula_installer: handle attempts to load invalid casks Certain casks in the main cask repository may be invalid, for whatever reason. Without handling this exception, the user will get a cask-related exception while the formula of the same name is installed, and their installation will abort half-completed. Fixes #5709. --- Library/Homebrew/formula_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index e3cc0ea746..45f2f08499 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -790,7 +790,7 @@ class FormulaInstaller cask_installed_with_formula_name = begin Cask::CaskLoader.load(formula.name).installed? - rescue Cask::CaskUnavailableError + rescue Cask::CaskUnavailableError, Cask::CaskInvalidError false end