diff --git a/Library/Homebrew/cask/cask.rb b/Library/Homebrew/cask/cask.rb index c2a53ade24..0e8a1f9c00 100644 --- a/Library/Homebrew/cask/cask.rb +++ b/Library/Homebrew/cask/cask.rb @@ -323,6 +323,8 @@ module Cask def tap_git_head @tap_git_head ||= tap&.git_head + rescue TapUnavailableError + nil end def populate_from_api!(json_cask) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index b6be0cb44b..11ee34f314 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -2232,6 +2232,8 @@ class Formula def tap_git_head tap&.git_head + rescue TapUnavailableError + nil end delegate env: :"self.class"