add comment to .drop(), don't add blank lines to services array
This commit is contained in:
parent
e8e6ee30b4
commit
1ddd130ef9
@ -98,7 +98,10 @@ module Cask
|
||||
all_services << service unless service.include?("*")
|
||||
next unless service.include?("*")
|
||||
|
||||
all_services += find_launchctl_with_wildcard(service)
|
||||
found_services = find_launchctl_with_wildcard(service)
|
||||
next if found_services.blank?
|
||||
|
||||
found_services.each { |service| all_services += service}
|
||||
end
|
||||
|
||||
all_services.each do |service|
|
||||
@ -282,6 +285,7 @@ module Cask
|
||||
def find_launchctl_with_wildcard(search)
|
||||
regex = Regexp.escape(search).gsub("\\*", ".*")
|
||||
system_command!("/bin/launchctl", args: ["list"])
|
||||
# skip stdout column headers
|
||||
.stdout.lines.drop(1)
|
||||
.map do |line|
|
||||
pid, _state, id = line.chomp.split("\t")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user