From 0684a162930a4eb220ef62b0ab6699061e217d19 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 22 Feb 2024 21:51:51 +0100 Subject: [PATCH] Pass `warn` in `FromNameLoader`. --- Library/Homebrew/formulary.rb | 2 +- Library/Homebrew/test/formulary_spec.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb index c95e94254d..0e7dcfdea7 100644 --- a/Library/Homebrew/formulary.rb +++ b/Library/Homebrew/formulary.rb @@ -779,7 +779,7 @@ module Formulary name = ref - loaders = Tap.map { |tap| super("#{tap}/#{name}") } + loaders = Tap.map { |tap| super("#{tap}/#{name}", warn: warn) } .compact .select { _1.path.exist? } diff --git a/Library/Homebrew/test/formulary_spec.rb b/Library/Homebrew/test/formulary_spec.rb index 7d7535303b..91c79174fa 100644 --- a/Library/Homebrew/test/formulary_spec.rb +++ b/Library/Homebrew/test/formulary_spec.rb @@ -550,6 +550,7 @@ RSpec.describe Formulary do before do old_tap.path.mkpath (old_tap.path/"tap_migrations.json").write tap_migrations.to_json + FileUtils.touch default_tap.formula_dir/"foo.rb" end it "does not warn when loading the short token" do