style: fix tap checking

`brew style` tap support was broken in 7d0ac4d (#17357), so now
something like `brew style homebrew/core` exits without checking
anything. This happens because the new file-handling logic doesn't
do anything with a tap path. Previously, a tap path would be added
to `ruby_files` but now it isn't added to any of the arrays of files
to check.

This fixes the issue by adding some logic to add the path to the
`ruby_files` array if it's a tap.
This commit is contained in:
Sam Ford 2024-06-11 21:23:28 -04:00 committed by Mike McQuaid
parent 4f35bc1e12
commit af02d94f73
No known key found for this signature in database

View File

@ -57,6 +57,7 @@ module Homebrew
when ".yml" when ".yml"
actionlint_files << path if path.realpath.to_s.include?("/.github/workflows/") actionlint_files << path if path.realpath.to_s.include?("/.github/workflows/")
else else
ruby_files << path if path.tap?
shell_files << path if path.realpath == HOMEBREW_BREW_FILE.realpath shell_files << path if path.realpath == HOMEBREW_BREW_FILE.realpath
end end
end end