Merge pull request #19602 from Homebrew/service_list_domain_target

services: use domain target in `launchctl list` command.
This commit is contained in:
Mike McQuaid 2025-03-25 15:05:24 +00:00 committed by GitHub
commit 29d852c012
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,7 +234,7 @@ module Homebrew
def status_output_success_type def status_output_success_type
@status_output_success_type ||= if System.launchctl? @status_output_success_type ||= if System.launchctl?
cmd = [System.launchctl.to_s, "list", service_name] cmd = [System.launchctl.to_s, "list", "#{System.domain_target}/#{service_name}"]
output = Utils.popen_read(*cmd).chomp output = Utils.popen_read(*cmd).chomp
if $CHILD_STATUS.present? && $CHILD_STATUS.success? && output.present? if $CHILD_STATUS.present? && $CHILD_STATUS.success? && output.present?
success = true success = true