From 1e3ddcade1a05303ee62f69ce99024f2401e04ee Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 18 Oct 2019 09:22:34 +0100 Subject: [PATCH] diagnostic: tweak modified detection. --- Library/Homebrew/diagnostic.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index d05f07807d..77247e746c 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -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