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