info: handle git:// URLs in origin remote
The URL being constructed is only able to extract the correct username when git@ or https:// URLs are found as the origin remote. This change allows git:// to be used as well. Signed-off-by: Maurice Kelly <osv-github@chatswood.org.uk> Closes Homebrew/homebrew#11670. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
1d0be89fa5
commit
3ab2cc62e2
@ -22,7 +22,7 @@ module Homebrew extend self
|
||||
|
||||
def github_fork
|
||||
if system "/usr/bin/which -s git"
|
||||
if `git remote -v` =~ %r{origin\s+(https?://|git@)github.com[:/](.+)/homebrew}
|
||||
if `git remote -v` =~ %r{origin\s+(https?://|git(?:@|://))github.com[:/](.+)/homebrew}
|
||||
$2
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user