Merge pull request #16304 from Bo98/generic-service

utils/service: assume no service system during generic OS tests
This commit is contained in:
Bo Anderson 2023-12-07 22:02:21 +00:00 committed by GitHub
commit c32bd1c7cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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