aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index b0d127b3b..59c01ef22 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -782,6 +782,9 @@ def check_the_git_origin
return unless which "git"
return if check_for_git_origin
+ # otherwise this will nag users with no repo about their remote
+ return unless (HOMEBREW_REPOSITORY/'.git').exist?
+
HOMEBREW_REPOSITORY.cd do
origin = `git config --get remote.origin.url`.chomp