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.
This commit is contained in:
parent
1fd8b387c6
commit
ea9977f3c3
@ -790,7 +790,7 @@ class FormulaInstaller
|
|||||||
|
|
||||||
cask_installed_with_formula_name = begin
|
cask_installed_with_formula_name = begin
|
||||||
Cask::CaskLoader.load(formula.name).installed?
|
Cask::CaskLoader.load(formula.name).installed?
|
||||||
rescue Cask::CaskUnavailableError
|
rescue Cask::CaskUnavailableError, Cask::CaskInvalidError
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user