From da27c70323d4625f963cb62536c7e2df9f6dd645 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Tue, 4 May 2021 23:10:40 -0400 Subject: [PATCH 1/2] bottle: properly set rebuild for new formulae --- Library/Homebrew/dev-cmd/bottle.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index dcb1c0a939..c06effa99b 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -341,6 +341,8 @@ module Homebrew end end end + # FormulaVersions#formula_at_revision returns nil for new formulae + rebuild ||= 0 filename = Bottle::Filename.create(f, bottle_tag.to_sym, rebuild) local_filename = filename.to_s From acebeab9cb2f44658384f56ffea9c9dc6d945e90 Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Wed, 5 May 2021 08:27:58 -0400 Subject: [PATCH 2/2] bottle: improve style of rebuild fallback Co-authored-by: Mike McQuaid --- Library/Homebrew/dev-cmd/bottle.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index c06effa99b..f7e3883bad 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -339,10 +339,8 @@ module Homebrew else 0 end - end + end || 0 end - # FormulaVersions#formula_at_revision returns nil for new formulae - rebuild ||= 0 filename = Bottle::Filename.create(f, bottle_tag.to_sym, rebuild) local_filename = filename.to_s