From cc6420e6126e307ce9a97695a00029aef85a96ff Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Sun, 30 Apr 2017 21:06:59 +0200 Subject: [PATCH] Fix --- src/ci/scripts/cleanup.ps1 | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/ci/scripts/cleanup.ps1 b/src/ci/scripts/cleanup.ps1 index 1055a375f..90228c659 100644 --- a/src/ci/scripts/cleanup.ps1 +++ b/src/ci/scripts/cleanup.ps1 @@ -37,22 +37,14 @@ if ($Verbose) foreach ($procName in $seleniumProcesses) { Write-Output "Filter: name = '$procName'" - $processes = Get-WmiObject Win32_Process -Filter "name = '$procName'" | Where-Object {$_.GetOwner().User -eq $currentUser } - $processes2 = Get-WmiObject Win32_Process -Filter "name = '$procName'" + $processes = Get-WmiObject Win32_Process -Filter "name = '$procName'" | Where-Object {$_.GetOwner().User -eq $currentUser } | Where-Object {$_.CommandLine -match "selenium-server"} if ($Verbose) { Write-Output "Processes $processes" - Write-Output "Processes2 $processes2" } foreach($proc in $processes) { - if($proc.CommandLine.Contains("selenium-server")) - { - Write-Host "stopping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." - Stop-Process -F $proc.ProcessId - } else - { - Write-Host "skipping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." - } + Write-Host "stopping proccess $($proc.ProcessId) with $($proc.ThreadCount) threads; $($proc.CommandLine.Substring(0, 50))..." + Stop-Process -F $proc.ProcessId } } -- 2.39.5