Skip to content
Snippets Groups Projects
Commit 13b4cb97 authored by Jaswant Panchumarti (Kitware)'s avatar Jaswant Panchumarti (Kitware)
Browse files

ci: ignore chromes outside ".gitlab/chrome" dir in terminate_chrome_processes

- this script now filters the processes by path so that user's instance of chrome.exe are unaffected.
parent 5ee9930b
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,11 @@ $chromeProcesses = Get-Process -Name "chrome" -ErrorAction SilentlyContinue
if ($chromeProcesses) {
# Iterate through each process and kill it
foreach ($process in $chromeProcesses) {
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
Write-Host "Killed process $($process.Name) with ID $($process.Id)"
# Only terminates chrome processes which started from CI.
if ("$($process.Path)" -Like "*\.gitlab\chrome\chrome.exe") {
Stop-Process -Id $process.Id -Force -ErrorAction SilentlyContinue
Write-Host "Killed process $($process.Name) with ID $($process.Id)"
}
}
} else {
Write-Host "No chrome processes found."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment