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
This commit is contained in:
Steve Peters 2021-05-25 23:20:15 -07:00 committed by GitHub
parent 6f1398a533
commit 2655014951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,7 +202,7 @@ module Homebrew
# 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