mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
tap: cleanup remote_repo
method
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
4e61f61a20
commit
0b214da4eb
@ -143,7 +143,10 @@ class Tap
|
|||||||
def remote_repo
|
def remote_repo
|
||||||
raise TapUnavailableError, name unless installed?
|
raise TapUnavailableError, name unless installed?
|
||||||
|
|
||||||
@remote_repo ||= remote&.sub(%r{^https://github\.com/}, "")&.sub(/\.git$/, "")
|
return unless remote
|
||||||
|
|
||||||
|
@remote_repo ||= remote.delete_prefix("https://github.com/")
|
||||||
|
.delete_suffix(".git")
|
||||||
end
|
end
|
||||||
|
|
||||||
# The default remote path to this {Tap}.
|
# The default remote path to this {Tap}.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user