diff options
| author | Xu Cheng | 2015-09-08 15:24:28 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-09-09 12:19:17 +0800 |
| commit | bff03ee5bac3a22c1fb668237db41ce1892d83c3 (patch) | |
| tree | 7954f08781eefbced0a3dfb2192da4e5a80f79de /Library/Homebrew | |
| parent | 31ddce85e7d37eac032e0dd80a6f45cd2ff1d4f8 (diff) | |
| download | brew-bff03ee5bac3a22c1fb668237db41ce1892d83c3.tar.bz2 | |
doctor: use Homebrew.git_origin
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index b720b69fe..6e8dc8e9f 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -916,10 +916,9 @@ class Checks def check_git_origin return unless git? && (HOMEBREW_REPOSITORY/".git").exist? - HOMEBREW_REPOSITORY.cd do - origin = `git config --get remote.origin.url`.strip + origin = Homebrew.git_origin - if origin.empty? then <<-EOS.undent + if origin.nil? then <<-EOS.undent Missing git origin remote. Without a correctly configured origin, Homebrew won't update @@ -927,7 +926,7 @@ class Checks cd #{HOMEBREW_REPOSITORY} git remote add origin https://github.com/Homebrew/homebrew.git EOS - elsif origin !~ /(mxcl|Homebrew)\/homebrew(\.git)?$/ then <<-EOS.undent + elsif origin !~ /(mxcl|Homebrew)\/homebrew(\.git)?$/ then <<-EOS.undent Suspicious git origin remote found. With a non-standard origin, Homebrew won't pull updates from @@ -938,7 +937,6 @@ class Checks origin remote to point at the main repository, located at: https://github.com/Homebrew/homebrew.git EOS - end end end |
