Method: Pod::Source#url
- Defined in:
- lib/cocoapods-core/source.rb
#url ⇒ String
Note:
In the past we had used git ls-remote --get-url, but this could
lead to an issue when finding a source based on its URL when git
is configured to rewrite URLs with the url.<base>.insteadOf
option. See https://github.com/CocoaPods/CocoaPods/issues/2724.
Returns The URL of the source.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/cocoapods-core/source.rb', line 47 def url @url ||= begin remote = repo_git(%w(config --get remote.origin.url)) if !remote.empty? remote elsif (repo + '.git').exist? "file://#{repo}/.git" end end end |