diff options
| author | Simon Sigurdhsson | 2013-01-16 15:56:36 +0100 |
|---|---|---|
| committer | Jack Nagel | 2013-01-17 17:18:15 -0600 |
| commit | 8000fb807feccb3019536468a75dfecb1d2dcee9 (patch) | |
| tree | 5b462da162095dac712b0f182910faf4869b06e4 /Library/Homebrew/cmd/--config.rb | |
| parent | 968782a31b98697a5be8f31097f48e4fb1ddfb66 (diff) | |
| download | brew-8000fb807feccb3019536468a75dfecb1d2dcee9.tar.bz2 | |
Doctor check for origin
Added checks on doctor.rb for:
* Missing git origin
* git origin not pointing at mxcl/homebrew
Tests use `git config --get remote.origin.url`.
Also added printout of origin to --config.rb.
Fixes Homebrew/homebrew#14399.
Closes Homebrew/homebrew#17117.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/--config.rb')
| -rw-r--r-- | Library/Homebrew/cmd/--config.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb index ac113c885..6f6368291 100644 --- a/Library/Homebrew/cmd/--config.rb +++ b/Library/Homebrew/cmd/--config.rb @@ -54,6 +54,13 @@ module Homebrew extend self if head.empty? then "(none)" else head end end + def origin + origin = HOMEBREW_REPOSITORY.cd do + `git config --get remote.origin.url`.chomp + end + if origin.empty? then "(none)" else origin end + end + def describe_path path return "N/A" if path.nil? realpath = path.realpath @@ -124,6 +131,7 @@ module Homebrew extend self def dump_verbose_config puts "HOMEBREW_VERSION: #{HOMEBREW_VERSION}" + puts "ORIGIN: #{origin}" puts "HEAD: #{head}" puts "HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}" puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}" |
