From e404a71e43bd5192e8ec0dec2e3ccef18292bfb7 Mon Sep 17 00:00:00 2001 From: Josh Hagins <hagins.josh@gmail.com> Date: Fri, 26 Feb 2016 13:35:36 -0500 Subject: [PATCH] diagnostic: only warn about local newline config cd to `HOMEBREW_REPOSITORY` before checking git newline settings. Closes Homebrew/homebrew#49565. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com> --- Library/Homebrew/diagnostic.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index ecd347ca7e..2e955216fe 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -1003,7 +1003,7 @@ module Homebrew def check_git_newline_settings return unless Utils.git_available? - autocrlf = `git config --get core.autocrlf`.chomp + autocrlf = HOMEBREW_REPOSITORY.cd { `git config --get core.autocrlf`.chomp } if autocrlf == "true" then <<-EOS.undent Suspicious Git newline settings found. -- GitLab