fix style

This commit is contained in:
Bevan Kay 2022-12-19 14:39:48 +11:00
parent 01f865f93a
commit 84f288be79
No known key found for this signature in database
GPG Key ID: C55CB024B5314B57

View File

@ -285,8 +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)
.stdout.lines.drop(1) # skip stdout column headers
.map do |line|
pid, _state, id = line.chomp.split("\t")
id if pid.to_i.nonzero? && id.match?(regex)