Skip to content

Commit

Permalink
Simplify Tap#remote_repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Mar 4, 2024
1 parent d7d4c82 commit b4167f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/tap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,9 @@ def remote

# The remote repository name of this {Tap}.
# e.g. `user/homebrew-repo`
sig { returns(T.nilable(String)) }
def remote_repo
return unless remote
return unless (remote = self.remote)

@remote_repo ||= remote.delete_prefix("https://github.com/")
.delete_prefix("[email protected]:")
Expand Down

0 comments on commit b4167f9

Please sign in to comment.