Merge pull request #4858 from cblecker/bump-pr-protocol

Determine remote_url using git config
This commit is contained in:
Mike McQuaid 2018-09-09 15:18:49 +01:00 committed by GitHub
commit 1fe8cf7079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -325,7 +325,11 @@ module Homebrew
odie "Unable to fork: #{e.message}!" odie "Unable to fork: #{e.message}!"
end end
remote_url = response.fetch("clone_url") if system("git", "config", "--local", "--get-regexp", "remote\..*\.url", "git@github.com:.*")
remote_url = response.fetch("ssh_url")
else
remote_url = response.fetch("clone_url")
end
username = response.fetch("owner").fetch("login") username = response.fetch("owner").fetch("login")
safe_system "git", "fetch", "--unshallow", "origin" if shallow safe_system "git", "fetch", "--unshallow", "origin" if shallow