Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit 020d252

Browse files
reworked logging a bit more
1 parent 8dfb799 commit 020d252

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,17 @@ runs:
108108
if ( $stopwatch.elapsed -lt $timeout )
109109
{
110110
if ( (-not $global:PSVersionTable.Platform) -or ($global:PSVersionTable.Platform -eq "Win32NT") ) {
111-
Write-Host "End of log stream, attempting to cleanup orphaned processes..."
111+
Write-Host "Attempting to cleanup orphaned processes..."
112112
$procsWithParent = Get-CimInstance -ClassName "win32_process" | Select-Object ProcessId,ParentProcessId
113113
$orphaned = $procsWithParent | Where-Object -Property ParentProcessId -NotIn $procsWithParent.ProcessId
114114
$procs = Get-Process -IncludeUserName | Where-Object -Property Id -In $orphaned.ProcessId | Where-Object { $_.UserName -match $env:username }
115115
$procs | ForEach-Object { Stop-Process -Id $_.Id -ErrorAction SilentlyContinue }
116116
} else {
117-
Write-Host "End of log stream"
118117
}
119118
}
120119
120+
Write-Host "End of log stream"
121+
121122
Start-Sleep -Milliseconds 1
122123
Receive-Job $ljob
123124
} while ( $fileLocked )

0 commit comments

Comments
 (0)