diagnostic: tweak modified detection.

This commit is contained in:
Mike McQuaid 2019-10-18 09:22:34 +01:00
parent 6bc1785c88
commit 1e3ddcade1
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -665,8 +665,10 @@ module Homebrew
modified = []
HOMEBREW_REPOSITORY.cd do
modified.concat `git status --untracked-files=all --porcelain -- Library/Homebrew/ 2>/dev/null`.split("\n")
return if modified.empty?
status = `git status --untracked-files=all --porcelain -- Library/Homebrew/ 2>/dev/null`
return if status.blank?
modified = status.split("\n")
end
message = <<~EOS