named_args: handle additional cask exception

This commit is contained in:
Bevan Kay 2022-06-02 12:21:44 +10:00
parent 20c845d470
commit 183cbe0001
No known key found for this signature in database
GPG Key ID: C55CB024B5314B57

View File

@ -155,7 +155,7 @@ module Homebrew
end end
return cask return cask
rescue Cask::CaskUnreadableError => e rescue Cask::CaskUnreadableError, Cask::CaskInvalidError => e
# If we're trying to get a keg-like Cask, do our best to handle it # If we're trying to get a keg-like Cask, do our best to handle it
# not being readable and return something that can be used. # not being readable and return something that can be used.
if want_keg_like_cask if want_keg_like_cask