diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index e22c77a3d9..b0c914ae01 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -743,6 +743,14 @@ module Homebrew tag_hashes.count > 1 && tag_hashes.uniq { |tag_hash| "#{tag_hash["cellar"]}-#{tag_hash["sha256"]}" }.count == 1 + old_all_bottle = old_bottle_spec.tag?(Utils::Bottles.tag(:all)) + if !all_bottle && old_all_bottle && !args.no_all_checks? + odie <<~ERROR + #{formula} should have an `:all` bottle but one cannot be created: + #{JSON.pretty_generate(tag_hashes)} + ERROR + end + bottle_hash["bottle"]["tags"].each do |tag, tag_hash| cellar = tag_hash["cellar"] cellar = cellar.to_sym if any_cellars.include?(cellar)