From 26550149518a155daff2c636f8c97c6411ae5614 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 25 May 2021 23:20:15 -0700 Subject: [PATCH] extract: use downcased version in filename Formula filenames are required to be lowercase, so the extract command should downcase version before using it to construct the filename. I noticed this while extracting tbb@2020, which has version 2020_U3 and resulted in tbb@2020_U3.rb --- Library/Homebrew/dev-cmd/extract.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/extract.rb b/Library/Homebrew/dev-cmd/extract.rb index c6d1682521b17..bae5e4cb90dab 100644 --- a/Library/Homebrew/dev-cmd/extract.rb +++ b/Library/Homebrew/dev-cmd/extract.rb @@ -202,7 +202,7 @@ def extract # Remove bottle blocks, they won't work. result.sub!(/ bottle do.+?end\n\n/m, "") if destination_tap != source_tap - path = destination_tap.path/"Formula/#{name}@#{version}.rb" + path = destination_tap.path/"Formula/#{name}@#{version.to_s.downcase}.rb" if path.exist? unless args.force? odie <<~EOS