Skip to content

Commit fc86107

Browse files
authored
Merge pull request #19705 from Homebrew/revert-19702-services-loaded_file
Revert "services: add loaded_file data"
2 parents 7499244 + 76901b1 commit fc86107

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

Library/Homebrew/services/formula_wrapper.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@ def exit_code
188188
Regexp.last_match(1).to_i if status_output =~ exit_code_regex(status_type)
189189
end
190190

191-
def loaded_file
192-
status_output, _, status_type = status_output_success_type
193-
Regexp.last_match(1) if status_output =~ loaded_file_regex(status_type)
194-
end
195-
196191
sig { returns(T::Hash[Symbol, T.anything]) }
197192
def to_hash
198193
hash = {
@@ -207,7 +202,6 @@ def to_hash
207202
status: status_symbol,
208203
file: service_file_present? ? dest : service_file,
209204
registered: service_file_present?,
210-
loaded_file:,
211205
}
212206

213207
return hash unless service?
@@ -308,15 +302,6 @@ def pid_regex(status_type)
308302
@pid_regex.fetch(status_type)
309303
end
310304

311-
def loaded_file_regex(status_type)
312-
@loaded_file_regex ||= {
313-
launchctl_list: //, # not available
314-
launchctl_print: /path = (.*)/,
315-
systemctl: /Loaded: .*? \((.*);/,
316-
}
317-
@loaded_file_regex.fetch(status_type)
318-
end
319-
320305
sig { returns(T::Boolean) }
321306
def boot_path_service_file_present?
322307
boot_path = System.boot_path

Library/Homebrew/test/services/formula_wrapper_spec.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,6 @@
369369
exit_code: nil,
370370
file: Pathname.new("/usr/local/opt/mysql/homebrew.mysql.plist"),
371371
loaded: false,
372-
loaded_file: nil,
373372
name: "mysql",
374373
pid: nil,
375374
registered: false,
@@ -391,7 +390,6 @@
391390
exit_code: nil,
392391
file: Pathname.new("/tmp_home/Library/LaunchAgents/homebrew.mysql.plist"),
393392
loaded: false,
394-
loaded_file: nil,
395393
name: "mysql",
396394
pid: nil,
397395
registered: true,
@@ -418,7 +416,6 @@
418416
file: Pathname.new("/tmp_home/Library/LaunchAgents/homebrew.mysql.plist"),
419417
interval: nil,
420418
loaded: false,
421-
loaded_file: nil,
422419
log_path: nil,
423420
name: "mysql",
424421
pid: nil,

0 commit comments

Comments
 (0)