From a0799bfbf9a0ffb87d50ece8c5de26f75bf371b2 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Mon, 24 May 2021 23:30:46 +0900 Subject: [PATCH 1/3] add cask tap to Diagnostic::Checks#check_git_status --- Library/Homebrew/diagnostic.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index ade58101d1..8d10a623f0 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -679,10 +679,16 @@ module Homebrew message = nil - { + taps = { "Homebrew/brew" => HOMEBREW_REPOSITORY, "Homebrew/homebrew-core" => CoreTap.instance.path, - }.each do |name, path| + } + + if Pathname.new("#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask").exist? + taps["Homebrew/homebrew-cask"] = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask") + end + + taps.each do |name, path| status = path.cd do `git status --untracked-files=all --porcelain 2>/dev/null` end From bfa9938e3f1b344c886b5eaca6706204be26b70d Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Thu, 27 May 2021 21:43:08 +0900 Subject: [PATCH 2/3] repair and add cask taps --- Library/Homebrew/diagnostic.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index 8d10a623f0..c3fe48a698 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -684,8 +684,9 @@ module Homebrew "Homebrew/homebrew-core" => CoreTap.instance.path, } - if Pathname.new("#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask").exist? - taps["Homebrew/homebrew-cask"] = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask") + %w[cask cask-drivers cask-fonts cask-versions].each do |tap| + cask_tap = Tap.fetch "homebrew", tap + taps[cask_tap.full_name] = cask_tap.path if cask_tap.installed? end taps.each do |name, path| From 40b39151f916e612c1fc7efe259b3fc28efe7336 Mon Sep 17 00:00:00 2001 From: hyuraku <32809703+hyuraku@users.noreply.github.com> Date: Sun, 30 May 2021 16:26:58 +0900 Subject: [PATCH 3/3] rename the variable --- Library/Homebrew/diagnostic.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb index c3fe48a698..93d6ade63b 100644 --- a/Library/Homebrew/diagnostic.rb +++ b/Library/Homebrew/diagnostic.rb @@ -679,17 +679,17 @@ module Homebrew message = nil - taps = { + repos = { "Homebrew/brew" => HOMEBREW_REPOSITORY, "Homebrew/homebrew-core" => CoreTap.instance.path, } %w[cask cask-drivers cask-fonts cask-versions].each do |tap| cask_tap = Tap.fetch "homebrew", tap - taps[cask_tap.full_name] = cask_tap.path if cask_tap.installed? + repos[cask_tap.full_name] = cask_tap.path if cask_tap.installed? end - taps.each do |name, path| + repos.each do |name, path| status = path.cd do `git status --untracked-files=all --porcelain 2>/dev/null` end