From b1b94187af3dc4194721bc1a15bff1ec7a904eb6 Mon Sep 17 00:00:00 2001 From: Yukai Chou Date: Wed, 5 Apr 2023 03:25:59 +0800 Subject: [PATCH] tap: tighten `formula_file?(file)` Cask is never a formula. --- Library/Homebrew/tap.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 3439ec0c92..fb09122cb7 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -570,7 +570,7 @@ class Tap file = file.expand_path(path) return false unless ruby_file?(file) - file.to_s.start_with?("#{formula_dir}/") + file.to_s.start_with?("#{formula_dir}/") && !file.to_s.start_with?("#{cask_dir}/") end # return true if given path would present a {Cask} file in this {Tap}.