From 2dcd8846a30d25e19855174ab99fc3a2d86dd245 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 25 Mar 2025 14:16:29 +0000 Subject: [PATCH] services: use domain target in `launchctl list` command. If a service is somehow duplicated across multiple domains, this ensures that the correct output is produced. --- Library/Homebrew/services/formula_wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/services/formula_wrapper.rb b/Library/Homebrew/services/formula_wrapper.rb index bb2a21e3f0..86694f5d8d 100644 --- a/Library/Homebrew/services/formula_wrapper.rb +++ b/Library/Homebrew/services/formula_wrapper.rb @@ -234,7 +234,7 @@ module Homebrew def status_output_success_type @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 if $CHILD_STATUS.present? && $CHILD_STATUS.success? && output.present? success = true