From 893f7f16dbf06da0df95d66a46afa83b078667f3 Mon Sep 17 00:00:00 2001 From: Zipofar Date: Wed, 25 Oct 2023 12:36:44 +0300 Subject: [PATCH] Fix linux find skaffold pid --- lib/uffizzi/services/dev_service.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/uffizzi/services/dev_service.rb b/lib/uffizzi/services/dev_service.rb index 1857d19f..61caf485 100644 --- a/lib/uffizzi/services/dev_service.rb +++ b/lib/uffizzi/services/dev_service.rb @@ -232,9 +232,9 @@ def find_skaffold_pid(pid) end # HACK: For Linux - parent_process = processes.detect do |ps| - ps.gsub(/\s+/, ' ').lstrip.split[2].to_s == pid.to_s - end + parent_process = processes + .map { |ps| ps.gsub(/\s+/, ' ').lstrip.split } + .detect { |ps| ps[2].to_s == pid.to_s } parent_process[1] end