1
0
mirror of https://github.com/firstBitMarksistskaya/jenkins-lib.git synced 2025-08-25 20:09:25 +02:00

fix getPIDs again

This commit is contained in:
Dima
2024-12-13 13:31:57 +03:00
parent 0a78703449
commit 8e4e76a60e

View File

@@ -20,7 +20,7 @@ class CoverageUtils {
script = "ps -aux | grep '$name' | grep -v grep | awk '{print \$2}'"
pids = steps.sh(script, false, true, 'UTF-8')
} else {
script = "@echo off\nchcp 65001 > nul\nfor /f \"tokens=2\" %%a in (\"tasklist ^| findstr $name\") do (@echo %%a)"
script = "@echo off\nchcp 65001 > nul\nfor /f \"tokens=2\" %%a in ('tasklist ^| findstr \"$name\"') do (@echo %%a)"
pids = steps.bat(script, false, true, 'UTF-8')
}
return pids.split('\r?\n').toList()