Skip to content

Commit

Permalink
fix pids
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Sep 2, 2024
1 parent 71f4791 commit ef32674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class Yaxunit implements Serializable {
String pids

if (steps.isUnix()) {
pids = steps.sh("pidof $name", false, true, 'UTF-8')
pids = steps.sh("ps -aux | grep '$name' | awk '{print \$2}'", false, true, 'UTF-8')
} else {
pids = steps.bat("chcp 65001 > nul \nfor /f \"tokens=2\" %a in ('tasklist ^| findstr $name') do @echo %a", false, true, 'UTF-8')
}
Expand Down

0 comments on commit ef32674

Please sign in to comment.