Skip to content

Commit

Permalink
fix lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Dec 13, 2024
1 parent 5327243 commit 1376330
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/ru/pulsar/jenkins/library/steps/CoverageCleanup.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class CoverageCleanup implements Serializable {
private final JobConfiguration config
private final String stageName

private String encoding = 'UTF-8'

CoverageCleanup(JobConfiguration config, String stageName = "") {
this.config = config
this.stageName = stageName
Expand Down Expand Up @@ -39,9 +37,14 @@ class CoverageCleanup implements Serializable {
if (steps.isUnix()) {
command = "kill $pids"
} else {
def pidsForCmd = pids.split(" ")
.each { it -> "/PID $it" }
.join(" ")
def pidsForCmd = ''
def pidsArray = pids.split(" ")

pidsArray.each {
pidsForCmd += "/PID $it"
}
pidsForCmd = pidsForCmd.trim()

command = "taskkill $pidsForCmd /F"
}
steps.cmd(command, true, false)
Expand Down

0 comments on commit 1376330

Please sign in to comment.