diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 94e466f3e7..42b2090dd0 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -723,7 +723,7 @@ def check_git_newline_settings autocrlf = `git config --get core.autocrlf`.chomp safecrlf = `git config --get core.safecrlf`.chomp - unless autocrlf == 'false' then <<-EOS.undent + if !autocrlf.empty? && autocrlf != 'false' then <<-EOS.undent Suspicious Git newline settings found. The detected Git newline settings will cause checkout problems: