Have tap_git_head return nil when no tap is installed

This commit is contained in:
Rylan Polster 2024-07-15 13:47:21 -04:00
parent 3db7d01978
commit c4dabb5527
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64
2 changed files with 4 additions and 0 deletions

View File

@ -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)

View File

@ -2232,6 +2232,8 @@ class Formula
def tap_git_head
tap&.git_head
rescue TapUnavailableError
nil
end
delegate env: :"self.class"