From 8e4e76a60e84c92a6424b2100d7a7f3d906559d3 Mon Sep 17 00:00:00 2001 From: Dima Date: Fri, 13 Dec 2024 13:31:57 +0300 Subject: [PATCH] fix getPIDs again --- src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy b/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy index 88978c57..c984ab69 100644 --- a/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy +++ b/src/ru/pulsar/jenkins/library/utils/CoverageUtils.groovy @@ -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()