Skip to content

Commit 7dd8c5b

Browse files
committed
check the right pid
1 parent 435d3c5 commit 7dd8c5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/support/webpacker_helpers.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ def with_dev_server
9696
puts check_cmd
9797
status = `#{check_cmd}`
9898
puts status
99-
still_alive = status.include?(webpack_dev_server.to_s)
100-
puts "Still alive? #{still_alive} (#{webpack_dev_server.to_s})"
101-
if still_alive
102-
remaining_pid = status.match(/\n[a-z]+\s+(\d+)/)[1]
99+
remaining_pid_match = status.match(/\n[a-z]+\s+(\d+)/)
100+
if remaining_pid_match
101+
remaining_pid = remaining_pid_match[1]
102+
puts "Remaining #{remaining_pid}"
103103
kill_cmd = "kill -9 #{remaining_pid}"
104104
puts kill_cmd
105105
puts `#{kill_cmd}`

0 commit comments

Comments
 (0)