From 43b682ddeb4eeac4a2b72bf60c8799d773fde584 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 4 Mar 2024 15:59:59 +0000 Subject: [PATCH] bundle/tap_dumper: check for installed taps. Otherwise we'll always output homebrew/core and homebrew/cask even when they aren't actually tapped. --- lib/bundle/tap_dumper.rb | 2 +- spec/stub/tap.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundle/tap_dumper.rb b/lib/bundle/tap_dumper.rb index 3fff071f9..39125e2e6 100644 --- a/lib/bundle/tap_dumper.rb +++ b/lib/bundle/tap_dumper.rb @@ -34,7 +34,7 @@ def tap_names def taps @taps ||= begin require "tap" - Tap.each.to_a + Tap.select(&:installed?).to_a end end private_class_method :taps diff --git a/spec/stub/tap.rb b/spec/stub/tap.rb index 9d17350ff..f0a88007a 100644 --- a/spec/stub/tap.rb +++ b/spec/stub/tap.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Tap - def self.each + def self.select(&block) [] end