Merge pull request #19705 from Homebrew/revert-19702-services-loaded_file

Revert "services: add loaded_file data"
This commit is contained in:
Mike McQuaid 2025-04-04 12:24:20 +00:00 committed by GitHub
commit fc86107ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 18 deletions

View File

@ -188,11 +188,6 @@ module Homebrew
Regexp.last_match(1).to_i if status_output =~ exit_code_regex(status_type)
end
def loaded_file
status_output, _, status_type = status_output_success_type
Regexp.last_match(1) if status_output =~ loaded_file_regex(status_type)
end
sig { returns(T::Hash[Symbol, T.anything]) }
def to_hash
hash = {
@ -207,7 +202,6 @@ module Homebrew
status: status_symbol,
file: service_file_present? ? dest : service_file,
registered: service_file_present?,
loaded_file:,
}
return hash unless service?
@ -308,15 +302,6 @@ module Homebrew
@pid_regex.fetch(status_type)
end
def loaded_file_regex(status_type)
@loaded_file_regex ||= {
launchctl_list: //, # not available
launchctl_print: /path = (.*)/,
systemctl: /Loaded: .*? \((.*);/,
}
@loaded_file_regex.fetch(status_type)
end
sig { returns(T::Boolean) }
def boot_path_service_file_present?
boot_path = System.boot_path

View File

@ -369,7 +369,6 @@ RSpec.describe Homebrew::Services::FormulaWrapper do
exit_code: nil,
file: Pathname.new("/usr/local/opt/mysql/homebrew.mysql.plist"),
loaded: false,
loaded_file: nil,
name: "mysql",
pid: nil,
registered: false,
@ -391,7 +390,6 @@ RSpec.describe Homebrew::Services::FormulaWrapper do
exit_code: nil,
file: Pathname.new("/tmp_home/Library/LaunchAgents/homebrew.mysql.plist"),
loaded: false,
loaded_file: nil,
name: "mysql",
pid: nil,
registered: true,
@ -418,7 +416,6 @@ RSpec.describe Homebrew::Services::FormulaWrapper do
file: Pathname.new("/tmp_home/Library/LaunchAgents/homebrew.mysql.plist"),
interval: nil,
loaded: false,
loaded_file: nil,
log_path: nil,
name: "mysql",
pid: nil,