From 8619ed37ca422d287233b20b2495787c6d03368d Mon Sep 17 00:00:00 2001 From: Rylan Polster Date: Mon, 4 Dec 2023 14:11:31 -0500 Subject: [PATCH] Load `nil` reasons from API correctly --- Library/Homebrew/deprecate_disable.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/deprecate_disable.rb b/Library/Homebrew/deprecate_disable.rb index 8ade837dea58a6..adc3801cfa70ef 100644 --- a/Library/Homebrew/deprecate_disable.rb +++ b/Library/Homebrew/deprecate_disable.rb @@ -63,8 +63,8 @@ def message(formula_or_cask) end def to_reason_string_or_symbol(string, type:) - if (type == :formula && FORMULA_DEPRECATE_DISABLE_REASONS.key?(string.to_sym)) || - (type == :cask && CASK_DEPRECATE_DISABLE_REASONS.key?(string.to_sym)) + if (type == :formula && FORMULA_DEPRECATE_DISABLE_REASONS.key?(string&.to_sym)) || + (type == :cask && CASK_DEPRECATE_DISABLE_REASONS.key?(string&.to_sym)) return string.to_sym end