From e9cb08f431e5c4870726dae505ccf4704a35ccf5 Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sat, 10 Aug 2024 15:03:52 +0100 Subject: [PATCH] utils/service: Bump to Sorbet `typed: strict` --- Library/Homebrew/utils/service.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/utils/service.rb b/Library/Homebrew/utils/service.rb index ceb8cd36e2..3c13d75c70 100644 --- a/Library/Homebrew/utils/service.rb +++ b/Library/Homebrew/utils/service.rb @@ -1,4 +1,4 @@ -# typed: true +# typed: strict # frozen_string_literal: true module Utils @@ -27,7 +27,7 @@ module Utils return @launchctl if defined? @launchctl return if ENV["HOMEBREW_TEST_GENERIC_OS"] - @launchctl = which("launchctl") + @launchctl = T.let(which("launchctl"), T.nilable(Pathname)) end # Path to systemctl binary. @@ -36,7 +36,7 @@ module Utils return @systemctl if defined? @systemctl return if ENV["HOMEBREW_TEST_GENERIC_OS"] - @systemctl = which("systemctl") + @systemctl = T.let(which("systemctl"), T.nilable(Pathname)) end sig { returns(T::Boolean) }