From 9b369871e639d09649b4b43f4830bb81c26895eb Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 8 May 2023 21:43:12 +0800 Subject: [PATCH 1/2] Revert "utils/bottles: fix typechecking error" This reverts commit 071f6069d2cff272eaa9404f836cb1254c4fb588. --- Library/Homebrew/extend/os/mac/utils/bottles.rb | 2 +- Library/Homebrew/utils/bottles.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb index 1497064388..7d601f14f4 100644 --- a/Library/Homebrew/extend/os/mac/utils/bottles.rb +++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb @@ -7,7 +7,7 @@ module Utils undef tag def tag(symbol = nil) - return Utils::Bottles::Tag.from_symbol(symbol.to_sym) if symbol.present? + return Utils::Bottles::Tag.from_symbol(symbol) if symbol.present? Utils::Bottles::Tag.new(system: MacOS.version.to_sym, arch: Hardware::CPU.arch) end diff --git a/Library/Homebrew/utils/bottles.rb b/Library/Homebrew/utils/bottles.rb index 761f84dd07..1ef0334cea 100644 --- a/Library/Homebrew/utils/bottles.rb +++ b/Library/Homebrew/utils/bottles.rb @@ -11,7 +11,7 @@ module Utils class << self # Gets the tag for the running OS. def tag(symbol = nil) - return Tag.from_symbol(symbol.to_sym) if symbol.present? + return Tag.from_symbol(symbol) if symbol.present? @tag ||= Tag.new(system: HOMEBREW_SYSTEM.downcase.to_sym, arch: HOMEBREW_PROCESSOR.downcase.to_sym) From 975c4e66f7ea40bfa2a227d99b4f71430b90dcfc Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Mon, 8 May 2023 21:54:18 +0800 Subject: [PATCH 2/2] fetch: fix typecheck error This is a better replacement of #15381. --- Library/Homebrew/fetch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/fetch.rb b/Library/Homebrew/fetch.rb index c71ebc8efe..ea5095eab5 100644 --- a/Library/Homebrew/fetch.rb +++ b/Library/Homebrew/fetch.rb @@ -9,7 +9,7 @@ module Homebrew bottle = formula.bottle return true if args.force_bottle? && bottle.present? - return true if args.bottle_tag.present? && formula.bottled?(args.bottle_tag) + return true if args.bottle_tag.present? && formula.bottled?(args.bottle_tag&.to_sym) bottle.present? && formula.pour_bottle? &&