Skip to content

Commit

Permalink
only check for idle, not system
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelPesce committed Aug 1, 2024
1 parent f767e1b commit 22b7986
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
$process = Get-Process -Id $processId -ErrorAction SilentlyContinue
if ($process) {
Write-Host "Found valid process $process"
if ($process.Name -notcontains "Idle" -and $process.Name -notcontains "System") {
if ($process.Name -notcontains "Idle") {
try {
Write-Host "Attempting to kill ID $processId with name $process.Name."
Stop-Process -Id $process.Id -Force
Expand All @@ -110,7 +110,7 @@ jobs:
Write-Host "Failed to kill process with ID $processId - $_"
}
} else {
Write-Host "The process using port $port is a system process and cannot be terminated."
Write-Host "The process using port $port is the idle process and cannot be terminated."
}
} else {
Write-Host "No process found using port $port."
Expand Down

0 comments on commit 22b7986

Please sign in to comment.