Ignore error output from `Get-Process`
- allow FinishDumpCollectionForHangingBuilds.ps1 to complete w/o writing to `stderr`
This commit is contained in:
parent
11cea53557
commit
ff773bd843
|
|
@ -81,7 +81,7 @@ Out-File -FilePath $sentinelFile -InputObject $JobName | Out-Null;
|
|||
[System.Diagnostics.Process []]$AliveProcesses = @();
|
||||
foreach ($candidate in $CandidateProcessNames) {
|
||||
try {
|
||||
$candidateProcesses = Get-Process $candidate;
|
||||
$candidateProcesses = Get-Process $candidate 2>$null
|
||||
$candidateProcesses | ForEach-Object { Write-Output "Found candidate process $candidate with PID '$($_.Id)'." };
|
||||
$AliveProcesses += $candidateProcesses;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue