diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 88fb6d63c7..c70cbce062 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -645,9 +645,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy sig { returns(T::Hash[Symbol, T.any(String, Symbol)]) } def _curl_opts - return { user_agent: meta.fetch(:user_agent) } if meta.key?(:user_agent) - - {} + meta.slice(:user_agent) end sig { override.params(args: String, options: T.untyped).returns(SystemCommand::Result) }