From 882473861e6351f6d36c4c18647ce65a41fea035 Mon Sep 17 00:00:00 2001 From: Troels Thomsen Date: Mon, 11 Nov 2024 08:52:09 +0100 Subject: [PATCH] Keep implicit taps --- lib/bundle/commands/cleanup.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/bundle/commands/cleanup.rb b/lib/bundle/commands/cleanup.rb index 1e82149ed5..cdb9d81ea0 100644 --- a/lib/bundle/commands/cleanup.rb +++ b/lib/bundle/commands/cleanup.rb @@ -145,7 +145,9 @@ def recursive_dependencies(current_formulae, formulae_names, top_level: true) def taps_to_untap(global: false, file: nil) @dsl ||= Brewfile.read(global:, file:) + kept_formulae = @dsl.entries.select { |e| e.type == :brew }.map(&:name).map(&Formulary.method(:factory)) kept_taps = @dsl.entries.select { |e| e.type == :tap }.map(&:name) + kept_taps += kept_formulae.filter_map(&:tap).map(&:name) current_taps = Bundle::TapDumper.tap_names current_taps - kept_taps - IGNORED_TAPS end