Skip to content

Commit

Permalink
Fix linux find skaffold pid
Browse files Browse the repository at this point in the history
  • Loading branch information
zipofar committed Oct 25, 2023
1 parent 3d59cab commit 893f7f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/uffizzi/services/dev_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 893f7f1

Please sign in to comment.