Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,8 @@ public Exception ManageException(Exception e)
// 913088-2005/06/06
// PipelineStoppedException should not get added to $Error
// 2008/06/25 - narrieta: ExistNestedPromptException should not be added to $error either
if (!(e is HaltCommandException) && !(e is PipelineStoppedException) && !(e is ExitNestedPromptException))
// 2019/10/18 - StopUpstreamCommandsException should not be added either
if (!(e is HaltCommandException) && !(e is PipelineStoppedException) && !(e is ExitNestedPromptException) && !(e is StopUpstreamCommandsException))
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ Describe "Select-Object" -Tags "CI" {
$result[0].Size | Should -Be ($orig1 + 1)
$dirObject[0].Size | Should -Be ($orig1 + 1)
$dirObject[$TestLength].Size | Should -Be ($orig2 + 1)
}
}

It "Should not leak 'StopUpstreamCommandsException' internal exception for stopping upstream" {
1,2 | Select-Object -First 1 -ErrorVariable err
$err | Should -BeNullOrEmpty
}
}

Describe "Select-Object DRT basic functionality" -Tags "CI" {
Expand Down