From fab882fb716199556bac2dfbc3f515990bdcf0f7 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 4 Mar 2024 16:40:37 +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..d7a956b64 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(*) [] end