Skip to content

Commit

Permalink
fix getPIDs again
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Dec 13, 2024
1 parent 0a78703 commit 8e4e76a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8e4e76a

Please sign in to comment.