From de8eb35b7368418d9fd84b952e2a1f95e30e4ea2 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Mon, 4 Sep 2023 13:12:07 +0100 Subject: [PATCH] audit_file: check formula path --- Library/Homebrew/formula_auditor.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 6374604779..d05c0b1876 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -123,6 +123,14 @@ module Homebrew EOS end end + + return if !formula.core_formula? && formula.path == formula.tap.new_formula_path(formula.name) + + problem <<~EOS + Formula is in wrong path: + Expected: #{formula.tap.new_formula_path(formula.name)} + Actual: #{formula.path} + EOS end def self.aliases