fix: launchctl list can return empty id
causing Error: undefined method `match?' for nil:NilClass Seen in macOS Big Sur
This commit is contained in:
parent
04549ff16f
commit
278bc77f2d
@ -127,7 +127,7 @@ module Cask
|
||||
.map { |line| line.chomp.split("\t") }
|
||||
.map { |pid, state, id| [pid.to_i, state.to_i, id] }
|
||||
.select do |(pid, _, id)|
|
||||
pid.nonzero? && id.match?(/^#{Regexp.escape(bundle_id)}($|\.\d+)/)
|
||||
pid.nonzero? && /^#{Regexp.escape(bundle_id)}($|\.\d+)/.match?(id)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user