Skip to content

Commit

Permalink
bundle/tap_dumper: check for installed taps.
Browse files Browse the repository at this point in the history
Otherwise we'll always output homebrew/core and homebrew/cask even when
they aren't actually tapped.
  • Loading branch information
MikeMcQuaid committed Mar 4, 2024
1 parent ffd2348 commit 43b682d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/bundle/tap_dumper.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/stub/tap.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class Tap
def self.each
def self.select(&block)

Check failure on line 4 in spec/stub/tap.rb

View workflow job for this annotation

GitHub Actions / tests (ubuntu-latest)

Lint/UnusedMethodArgument: Unused method argument - `block`. If it's necessary, use `_` or `_block` as an argument name to indicate that it won't be used. If it's unnecessary, remove it. You can also write as `select(*)` if you want the method to accept any arguments but don't care about them.

Check failure on line 4 in spec/stub/tap.rb

View workflow job for this annotation

GitHub Actions / tests (macOS-latest)

Lint/UnusedMethodArgument: Unused method argument - `block`. If it's necessary, use `_` or `_block` as an argument name to indicate that it won't be used. If it's unnecessary, remove it. You can also write as `select(*)` if you want the method to accept any arguments but don't care about them.
[]
end

Expand Down

0 comments on commit 43b682d

Please sign in to comment.