utils/service: assume no service system during generic OS tests

This commit is contained in:
Bo Anderson 2023-12-07 03:16:15 +00:00
parent 8b984114b1
commit 03b6a83135
No known key found for this signature in database
GPG Key ID: 3DB94E204E137D65

View File

@ -25,6 +25,7 @@ module Utils
sig { returns(T.nilable(Pathname)) } sig { returns(T.nilable(Pathname)) }
def self.launchctl def self.launchctl
return @launchctl if defined? @launchctl return @launchctl if defined? @launchctl
return if ENV["HOMEBREW_TEST_GENERIC_OS"]
@launchctl = which("launchctl") @launchctl = which("launchctl")
end end
@ -33,6 +34,7 @@ module Utils
sig { returns(T.nilable(Pathname)) } sig { returns(T.nilable(Pathname)) }
def self.systemctl def self.systemctl
return @systemctl if defined? @systemctl return @systemctl if defined? @systemctl
return if ENV["HOMEBREW_TEST_GENERIC_OS"]
@systemctl = which("systemctl") @systemctl = which("systemctl")
end end