fixup! avoid duplicating logic

This commit is contained in:
Yukai Chou 2023-04-06 05:03:56 +08:00
parent 16c81d7a55
commit 0cfc4ab1e8

View File

@ -569,7 +569,7 @@ class Tap
file = Pathname.new(file) unless file.is_a? Pathname file = Pathname.new(file) unless file.is_a? Pathname
file = file.expand_path(path) file = file.expand_path(path)
return false unless ruby_file?(file) return false unless ruby_file?(file)
return false if cask_pathname?(file) return false if cask_file?(file)
file.to_s.start_with?("#{formula_dir}/") file.to_s.start_with?("#{formula_dir}/")
end end