From 8f82dd4d7f0c26b1f139e904d972d8d86ea03448 Mon Sep 17 00:00:00 2001 From: Douglas Eichelberger Date: Sun, 8 Sep 2024 16:43:25 -0700 Subject: [PATCH] Resolve runtime errors --- Library/Homebrew/formula_installer.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 6b1c1d891804c5..fdd10ab1083dd6 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -744,7 +744,7 @@ def fetch_dependency(dep) fi.fetch end - sig { params(dep: Dependency, inherited_options: T::Hash[String, Options]).void } + sig { params(dep: Dependency, inherited_options: T.any(Options, T::Hash[String, Options])).void } def install_dependency(dep, inherited_options) df = dep.to_formula @@ -780,7 +780,7 @@ def install_dependency(dep, inherited_options) fi = FormulaInstaller.new( df, options:, - link_keg: keg_had_linked_keg ? keg_was_linked : nil, + link_keg: keg_had_linked_keg && keg_was_linked, installed_as_dependency: true, installed_on_request: df.any_version_installed? && tab.present? && tab.installed_on_request, force_bottle: false, @@ -960,7 +960,7 @@ def build_argv def build FileUtils.rm_rf(formula.logs) - @start_time = T.let(Time.now, T.nilable(Time)) + @start_time = Time.now # 1. formulae can modify ENV, so we must ensure that each # installation has a pristine ENV when it starts, forking now is