From 6ad0ebd5b443f7694f5d6ab69d8e4f6ba913ff28 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Tue, 23 Jul 2024 11:26:12 +0100 Subject: [PATCH] env_config: Tighten hash types some more Co-authored-by: Bo Anderson --- Library/Homebrew/cmd/cleanup.rb | 2 +- Library/Homebrew/env_config.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/cleanup.rb b/Library/Homebrew/cmd/cleanup.rb index 4430137479..4d75cfaa5e 100644 --- a/Library/Homebrew/cmd/cleanup.rb +++ b/Library/Homebrew/cmd/cleanup.rb @@ -8,7 +8,7 @@ module Homebrew module Cmd class CleanupCmd < AbstractCommand cmd_args do - days = Homebrew::EnvConfig::ENVS[:HOMEBREW_CLEANUP_MAX_AGE_DAYS][:default] + days = Homebrew::EnvConfig::ENVS[:HOMEBREW_CLEANUP_MAX_AGE_DAYS]&.dig(:default) description <<~EOS Remove stale lock files and outdated downloads for all formulae and casks, and remove old versions of installed formulae. If arguments are specified, diff --git a/Library/Homebrew/env_config.rb b/Library/Homebrew/env_config.rb index b05296e6eb..ce228ec530 100644 --- a/Library/Homebrew/env_config.rb +++ b/Library/Homebrew/env_config.rb @@ -477,7 +477,7 @@ module Homebrew description: "A comma-separated list of hostnames and domain names excluded " \ "from proxying by `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.", }, - }.freeze, T::Hash[Symbol, T.untyped]) + }.freeze, T::Hash[Symbol, T::Hash[Symbol, T.untyped]]) sig { params(env: Symbol, hash: T::Hash[Symbol, T.untyped]).returns(String) } def env_method_name(env, hash)